These are chat archives for translate/dev

25th
Aug 2017
phlax
@phlax
Aug 25 2017 12:54
ping @jjmcarrascosa
Jose J. Martinez
@jjmcarrascosa
Aug 25 2017 12:55
@phlax hi :)
phlax
@phlax
Aug 25 2017 12:55
hey
so in terms of creating new projects, some sample code would be...
from pootle_language.models import Language
from pootle_project.models import Project

english = Language.objects.get(code="en")
new_project = Project.objects.create(code="example", fullname="Example", source_language=english)
but there is some other things that also need setting up
Jose J. Martinez
@jjmcarrascosa
Aug 25 2017 12:57
Really? So Easy? :)
phlax
@phlax
Aug 25 2017 12:57
and what they are depends on which pootle version you are going to target for the tool
we just released 2.8 - this has "pootle_fs" which is a new way of hooking up db projects to filesystem files
so 2.8 has pootle_fs but doesnt use it by default
Jose J. Martinez
@jjmcarrascosa
Aug 25 2017 12:58
Pootle 2.8.0rc6 is powered by Translate Toolkit 2.2.3.
phlax
@phlax
Aug 25 2017 12:58
2.9 will make pootle_fs the only way to hook up the filesystem
Jose J. Martinez
@jjmcarrascosa
Aug 25 2017 12:58
this is what we are using, is that ok?
phlax
@phlax
Aug 25 2017 12:59
yep for sure
altho it means we might need to PR against the 2.8.x branch
so the other things we need to set up for 2.8.x is the treestyle
trying to think if anything else
Jose J. Martinez
@jjmcarrascosa
Aug 25 2017 13:00
Oh, so the pull request I made is not valid
phlax
@phlax
Aug 25 2017 13:00
well, im in the middle of ripping out the code that it would work with i think
so better to use the 2.8.x branch and then we can release it as a point release
or
we can make the tool pootle_fs friendly and backport it with some changes
just checking the PR again...
Jose J. Martinez
@jjmcarrascosa
Aug 25 2017 13:02
well I don't really know what means the last sentence so as you prefer :)
ok
yes, sure
phlax
@phlax
Aug 25 2017 13:03
so a few differences...
but instead it has a translation_mapping
do you follow ?
Jose J. Martinez
@jjmcarrascosa
Aug 25 2017 13:06
Well yes I see what you are talking about
Actually
we don't really need any specific fs
phlax
@phlax
Aug 25 2017 13:08
yep for now
we don't have any mandatory structure
phlax
@phlax
Aug 25 2017 13:08
well, in that case its kinda needed
Jose J. Martinez
@jjmcarrascosa
Aug 25 2017 13:08
yes; i suppose
phlax
@phlax
Aug 25 2017 13:08
but not after pootle_fs lands
Jose J. Martinez
@jjmcarrascosa
Aug 25 2017 13:09
Well I don't know then what to do, what do you think
phlax
@phlax
Aug 25 2017 13:10
if we can land it today, then lets land it on master against 2.8.x
i can backport it to the other branch, and then fix it up as i land pootle_fs - which is probably gonna be over the weekend
not sure if that made sense
so next step
if you remove from ~line 80 onwards
and replace with the project.create code i posted
we can figure it out from there
Jose J. Martinez
@jjmcarrascosa
Aug 25 2017 13:13
ok, yes better step by step so I don't get lost :) I remove from ~80 onwards
and then I replace with what code sorry? the code you posted wherE?
phlax
@phlax
Aug 25 2017 13:14
above in channel
Jose J. Martinez
@jjmcarrascosa
Aug 25 2017 13:14
aaah
grteat
phlax
@phlax
Aug 25 2017 13:14
you will need to replace eg code="example" with something like code=options["code"]
Jose J. Martinez
@jjmcarrascosa
Aug 25 2017 13:14
let me do it right now
and then I make again a PR right?
phlax
@phlax
Aug 25 2017 13:15
so way to do it
  • make changes
  • create a new commit with changes
  • rebase to squash commits
  • use push -f to update PR
Jose J. Martinez
@jjmcarrascosa
Aug 25 2017 13:17
thank you very much
for your patience and step-by-step guidance
phlax
@phlax
Aug 25 2017 13:18
np
Jose J. Martinez
@jjmcarrascosa
Aug 25 2017 13:19
so no need to remove the section about fs or structure right? only from ~80
phlax
@phlax
Aug 25 2017 13:19
lets look at that next
Jose J. Martinez
@jjmcarrascosa
Aug 25 2017 13:19
ok
Jose J. Martinez
@jjmcarrascosa
Aug 25 2017 13:33
cna you check if I did it right?
phlax
@phlax
Aug 25 2017 13:33
yep
so far so good
im gonna add a test to your PR
Jose J. Martinez
@jjmcarrascosa
Aug 25 2017 13:35
ok. I will be out some days, let's keep in touch then.
thank you very much for your help
phlax
@phlax
Aug 25 2017 13:35
cool
Jose J. Martinez
@jjmcarrascosa
Aug 25 2017 13:35
BTW, this is for translationcommons.org
we are setting a learning center
for translators
for future translators of different universities
phlax
@phlax
Aug 25 2017 13:36
cool
Jose J. Martinez
@jjmcarrascosa
Aug 25 2017 13:36
now working with people from the University of Leeds and Lille
it's meant to be their main translating platform
phlax
@phlax
Aug 25 2017 13:36
great
Jose J. Martinez
@jjmcarrascosa
Aug 25 2017 13:36
to learn translation technologies :) Ok , keep in touch and have a great weekend!
phlax
@phlax
Aug 25 2017 13:39
cool - ill add a basic test to your PR
as more as implemented you/we can add to the test
done @jjmcarrascosa - if you check your PR again you will see it has an additional commit
you will need to rebase your local tree on this
before making further changes