These are chat archives for translate/dev

21st
Sep 2017
phlax
@phlax
Sep 21 2017 10:27
hey @jjmcarrascosa are you around today ?
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 13:12
@jj
@phlax hi!
phlax
@phlax
Sep 21 2017 13:12
hey!
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 13:12
Sorry I have a deadline tomorrow
and I was completely busy
phlax
@phlax
Sep 21 2017 13:12
cool, np
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 13:12
Let me check what we have here ... :)
Ok. So, basically I need to rebase and check again the review comments right?
phlax
@phlax
Sep 21 2017 13:14
yep, i reckon
i made quite a few changes - and tests now pass
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 13:14
great, let me check
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 13:32
@phlax sure
it passed all the tests
good job!
phlax
@phlax
Sep 21 2017 13:33
so there are a couple of nits left to address i think
also, im thinking we should give you commit access if thats ok with you
with the caveat that you should generally get 1 or 2 gtms before merging to master
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 13:36
Not sure I won't break anything :)
phlax
@phlax
Sep 21 2017 13:37
im sure it will be fine - main thing is to get review
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 13:38
So what I need to do
phlax
@phlax
Sep 21 2017 13:38
if you address the nits that @unho raised ill add acess now...
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 13:38
Sure, let me check those nits
phlax
@phlax
Sep 21 2017 13:39
permissions added - you should have an invitation email
im gonna raise a couple of related bugs...
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 13:41
Yes, I got it. In addition, I have already fixed in local those 2 nits
the typo and the filesystem desc line
phlax
@phlax
Sep 21 2017 13:43
cool
first ticket - translate/pootle#6761
second ticket - translate/pootle#6762
can you push back
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 13:45
sure
phlax
@phlax
Sep 21 2017 13:45
its important to push to PR immediately before pushing to master
otherwise the PR wont automatically close
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 13:47
so git push -f first, as usually
and then
phlax
@phlax
Sep 21 2017 13:47
yep
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 13:47
git push master?
phlax
@phlax
Sep 21 2017 13:47
you might need to rebase on current master
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 13:48
ah, I see
phlax
@phlax
Sep 21 2017 13:48
so basically the steps are...
  • rebase on current master
  • push to PR branch
  • push to master
command for pushing to master is....
git push upstream $localbranchname:master
one other thing worth mentioning
obv all of the tests need to pass - which covers code and formatting
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 13:50
Yes I understand
phlax
@phlax
Sep 21 2017 13:50
(with the caveat that some of the tests are a bit dodgy and can fail without anything broken)
Leandro Regueiro
@unho
Sep 21 2017 13:51
@jjmcarrascosa As a reminder, never force push to master branch.
phlax
@phlax
Sep 21 2017 13:51
but also its important to check coverage
force pushing wont work on master @unho
checking coverage obv highlights if you have added a lot of untested code
but its also very useful for gauging whether your change has had unintended consequences
or whether your change has obsoleted some existing code
which reminds me...
translate/pootle#6763
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 13:55
Dumb question. Rebasing on current master is git fetch origin + git rebase origin/master ?
phlax
@phlax
Sep 21 2017 13:56
hmm - deps on your remotes setup
im guessing its upstream rather than origin
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 13:56
let me check
sure
upstream
git fetch upstream git rebase upstream/master
phlax
@phlax
Sep 21 2017 13:57
yep
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 13:59
And for pushing to PR Branch is git push -f safe?
phlax
@phlax
Sep 21 2017 13:59
yep - altho it will overwrite the branch tree
in this case yes
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 14:01
So he idea is to commit all we have done to the master branch and then doing the tickets?
phlax
@phlax
Sep 21 2017 14:01
yep, i think thats ok
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 14:01
so I rebase with master, merge what we have done, then push to PR and push to master
phlax
@phlax
Sep 21 2017 14:02
yep
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 14:02
this way we will have the create_command on master branch
phlax
@phlax
Sep 21 2017 14:02
yep
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 14:02
question
phlax
@phlax
Sep 21 2017 14:02
i was reluctant to push documenting it - because i think it should be wrapped in a more generic command
Leandro Regueiro
@unho
Sep 21 2017 14:02
And the PR is automatically closed in the process. Closing all issues it fixes too.
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 14:03
Ok
Question. What I has been asked to do is to have a way to create a project, upload a document, convert and import it into pootle
since we have command lines for create a project
and commands for convert documents
I need basically and interface that makes the calls - create, convert ...
phlax
@phlax
Sep 21 2017 14:06
not sure i follow
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 14:06
so, a CAT tool, for example
first screen - project settings and file uploader
I can do something adhoc for my company, an interface that executes the commands create_project and then that transforms the document into po or whatever to import it into the project
something external to pootle, like an additional screen asking for project info and document to upload/translate
phlax
@phlax
Sep 21 2017 14:08
is the end goal to be able to upload files from an end users filesystem ?
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 14:08
the goal is let users upload files and translate them, yes
phlax
@phlax
Sep 21 2017 14:09
hmm, k
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 14:09
in different formats, from a web
yes
phlax
@phlax
Sep 21 2017 14:09
there is a file upload functionality already - but its pretty limited
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 14:09
but... I will do that
yes but it doesn't have formats
phlax
@phlax
Sep 21 2017 14:09
eg it only works with po, and the project etc must already exist
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 14:09
Yes, I know
that's why I'm here :)
phlax
@phlax
Sep 21 2017 14:10
having said that - im wondering if there is a way to do that inside pootle
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 14:10
now we already have a create project
phlax
@phlax
Sep 21 2017 14:10
doing it outside of pootle will require some other layers - like setting permissions etc
there is a related ticket - let me find it...
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 14:11
we would need to expand the formats to call to transform commands txt2po etc in case it's needed
and creating the project first
phlax
@phlax
Sep 21 2017 14:11
translate/pootle#6547
so re formats
we have done some work to make it possible for pootle to work directly with other formats - essentially doing the conversion inside pootle
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 14:12
ah, is already something done?
phlax
@phlax
Sep 21 2017 14:12
but there are some issues remaining around making that work
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 14:13
like?
phlax
@phlax
Sep 21 2017 14:13
hmm, thinking
i think the biggest issue is that many projects have other transformations/cleanups etc in their pipeline
we added a de/serializers system to allow users to do that in pootle, but its not well tested
the next thing is that there are different ways to convert to/from po for most formats
so doing that inside pootle implies some way of controlling the conversion process
neither of these are massive blockers - but the final one is a bit more complex - handling "monolingual" formats
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 15:08
Ok, so I rebased with np
(env) root@JJ:/home/jjmartinez/src/pootle_dev/pootle# git rebase upstream/master
First, rewinding head to replay your work on top of it...
Applying: Mark help tests as django_db to allow fetching choices from database
Applying: Add tests for create_project command
Applying: Added create_project pootle command
now, push to PR branch
git push -f
right?
phlax
@phlax
Sep 21 2017 15:09
yep
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 15:10
done. Now to master
done
ok seems ok to me
@unho question. Do you know if pootle includes any command for converting from odt? I see odf but not odt
Leandro Regueiro
@unho
Sep 21 2017 15:18
@jjmcarrascosa All commands to do format conversions are in Translate Toolkit. And yes, there is such command but converts to XLIFF format: http://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/odf2xliff.html
phlax
@phlax
Sep 21 2017 15:18
@unho i think there is odf2po too
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 15:18
but odf is not the format for presentations? I'm confused
Leandro Regueiro
@unho
Sep 21 2017 15:18
@phlax There is not.
That is odp
phlax
@phlax
Sep 21 2017 15:19
ah, sorry
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 15:19
ah, odf is generic. Great.
phlax
@phlax
Sep 21 2017 15:19
i was just checking the mimetypes
Leandro Regueiro
@unho
Sep 21 2017 15:19
odf here stands for all ODF formats
including odt, odp and so on.
phlax
@phlax
Sep 21 2017 15:19
i think odt is a template
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 15:19
Graet! So I can convert to xliff and xliff is natively supported by pootle right?
odt is text
Leandro Regueiro
@unho
Sep 21 2017 15:20
odt: Open Document Text
phlax
@phlax
Sep 21 2017 15:20
k, ignore me
Leandro Regueiro
@unho
Sep 21 2017 15:20
@jjmcarrascosa Yes, Pootle should support XLIFF mostly. Note XLIFF is an extensive format.
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 15:21
Yes, I know him.
phlax
@phlax
Sep 21 2017 15:21
and pootles support is still poish
internally pootle uses a po-like representation of all formats
this is ok for most formats as po is richer, but in the case of xliff that is not so
Jose J. Martinez
@jjmcarrascosa
Sep 21 2017 15:22
ok
Great then. See you later guys