[Mailman-Developers] Re: italian translations

2020-04-13 Thread Abhilash Raj
On Mon, Apr 13, 2020, at 10:49 AM, Daniele Pizzolli wrote:
> 
> Daniele Pizzolli writes:
> 
> > Done, it seems that not everything (95% overall) was imported, but on my
> > side I have 100% (at least from 3 days ago).
> >
> > I will check it later why or tomorrow and report any issue!
> 
> Hello!
> 
> I do not know the details but the gnu gettext tools and weblate do
> something differently.  Maybe there is a option to force the same
> behavior?  To get the initial po for mailman I used the instruction in:
> 
> src/mailman/docs/internationalization.rst

I just updated it yesterday to use update-pot.sh

> 
> And translated everything.  And now, after the import, I see additional
> lines like:
> 
> msgid "list:admin:notice:subscribe.txt"
> msgstr ""
> 
> I guess that those lines are related to the messages in
> src/mailman/templates/en/*txt.

Right.

> 
> It seems that the weblate interface resolve in some way the reference
> and display the file content instead of the file name.  Maybe there is
> something magic happening?

Yes, there is ;-) 

So the issue I had was that these template files are .txt files and it is hard 
to signal GNU xgettext to add them to the po files. So, I read a bit more about 
translation guides and it turns out that msgid in .po files don't really have 
to be the source string, but only an identifier and by default the identifier 
is the english version.

So, I changed the identifier for only template files to be called the name of 
the text file. This worked well for the code. They are called "monolingual" po 
files and Weblate supports them. For helping translators, it will display 
original source string from a reference .po file, which in our case is the 
English version. 

   https://docs.weblate.org/en/latest/formats.html#bimono
   
This also remind me of a bug in update-pot.sh script, it doesn't add the right 
source strings in the English .po file. I'll file a bug for it. 

> 
> I see that there are other languages templates... so what the
> translation should be?  The translated string or the template file name
> containing the translation?  Why not use the {% trans %} in templates?

Translation should be the translated string, but the msgid would be the file 
name not the value. You can look at the English po file for reference.
 
> Ah, now I saw the update-pot.sh!  But something is still not clear to
> me.
> 
> Is there a way to get the file content as msgid or as comment to ease
> the offline translation?  Or can I simply add my translation in place in
> src/mailman/templates/it/ and make a pull request?

You can look at the English translation as a reference, same as Weblate. But I 
can also add the English text as comments in the po file if you feel that is 
easier for you. It just needs updating the simple update-pot.sh script that you 
saw already.

> Maybe just adding the template string to the po will streamline the
> interaction both with weblate and any offline tool while waiting for a
> long term solution. I may work on little patch if you agree.

> 
> Let me know your suggestion and then I will complete the translations!
> 
> Best,
> Daniele
>

-- 
  thanks,
  Abhilash Raj (maxking)
___
Mailman-Developers mailing list -- mailman-developers@python.org
To unsubscribe send an email to mailman-developers-le...@python.org
https://mail.python.org/mailman3/lists/mailman-developers.python.org/
Mailman FAQ: https://wiki.list.org/x/AgA3

Security Policy: https://wiki.list.org/x/QIA9


[Mailman-Developers] Re: italian translations

2020-04-10 Thread Mike Gabriel via Mailman-Developers

Hi Daniele,

On  Fr 10 Apr 2020 12:29:45 CEST, Daniele Pizzolli wrote:


You documentation says to send the po files here.  That's what i did.

https://docs.mailman3.org/en/latest/translation.html#internationalization-i18n

The weblate system does not pick up the translation made until somebody
merge them into the source.  So somebody unaware of my translations
started the translation again.

Now, only 10/15 strings are translated using weblate, but it does not
make any sense to do the work.  I suggest to overwrite with my po that
are complete and somewhat coherent and discard the ones from weblate.
Contacting the other translator would be a nice action to do, at least
to explain what happened.  I will do it privately now, inviting him to
join the list.

Before the overlap the step was simply to drop in my files, now maybe
some merge step are required on weblate side. Hopefully weblate support
something like overwrite/take the translation from PO.

Getting the translations from different path in the same time frame is
very unlikely and having a conflict is quite remote in normal times.  I
guess that the restriction to mobility that almost everybody suffer now
made it more likely...


Weblate is the primary translation location now for Mailman3. Working  
on .po files directly is / should be discouraged.


What you can do to get the missing translations string / your  
translation strings into Mailman3 is logging into the hosted weblate  
site and transfer your translation work in to the Italian translation  
there.


Then your work will be added to Mailman3 using the newly setup weblate  
integration workflow.


Another, but more tricky option is one of the upstream devs (very  
likely Abhilash) to msgmerge your .po file into Weblate's latest  
version of the Italian translation file. But that demands time  
investments on Abhilash's side and IMHO this should be avoided.


Greets,
Mike
--

DAS-NETZWERKTEAM
c\o Technik- und Ökologiezentrum Eckernförde
Mike Gabriel, Marienthaler str. 17, 24340 Eckernförde
mobile: +49 (1520) 1976 148
landline: +49 (4351) 850 8940

GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22  0782 9AF4 6B30 2577 1B31
mail: mike.gabr...@das-netzwerkteam.de, http://das-netzwerkteam.de



pgpUP0Mw_qOpi.pgp
Description: Digitale PGP-Signatur
___
Mailman-Developers mailing list -- mailman-developers@python.org
To unsubscribe send an email to mailman-developers-le...@python.org
https://mail.python.org/mailman3/lists/mailman-developers.python.org/
Mailman FAQ: https://wiki.list.org/x/AgA3

Security Policy: https://wiki.list.org/x/QIA9


[Mailman-Developers] Re: italian translations

2020-04-10 Thread Abhilash Raj
On Fri, Apr 10, 2020, at 3:29 AM, Daniele Pizzolli wrote:
> 
> Stephen J. Turnbull writes:
> 
> > Daniele Pizzolli writes:
> >
> >  > That's a waste of effort.  Please add/merge it soon.  Also any feedback
> >  > will be appreciated.
> >
> > Sorry about this.  I think Abhilash (Cc'd) is the only person who
> > knows about the process for adding translations, and is also doing the
> > release engineering.  He lives and works in the San Francisco Bay
> > Area, which as you probably know has been a hot spot for COVID-19
> > infections.  I doubt he has much spare time for Mailman at the
> > moment.  I know I don't.

Right now, we have a fairly automated way to do the translation for all our 
Mailman components. We use hosted Weblate 
(https://hosted.weblate.org/projects/gnu-mailman/) for all components including 
Core, Postorius, Django-mailman3 and Hyperkitty. 

Weblate internally keeps the git repo in sync and any new translations are 
converted to git commits, one per author, per 24hrs. Then, Webalate is 
configured to send merge requests to Mailman's Gitlab repos, which can be 
merged like regular MRs. There are push events configured to notify Weblate to 
pull on each commit from Gitlab, so both repos are fairly in sync and we almost 
never have to deal with merge conflicts since after this setup. It is really 
convenient to do this.

Finally, during release, there is a script in the Mailman Core's root, 
generate-mo.sh, which basically compiles all the .po files to .mo files and 
requires GNU gettext. I did it for the first time in this release, but I am 
hoping to see if I can automate this so I don't forget, maybe hooking it up 
with setuptools somehow. Ideas & MRs are welcome, I am still not up to date 
with possibilities of Python packaging tools.

Rest of the projects are Django based and Django has commands to compile the 
translations at install time, so we don't do that yet at release time. I am 
again not up-to-date on what should be done here, so if I am doing it wrong, 
please let me know!

> 
> Thanks Stephen for the quick reply!
> 
> No worries, best wishes for everybody, safety first!
> 
> > He has been more active on the mailing lists lately, so I hope there
> > will be more release news soon.  Please be patient.
> 
> Yes, sure, stay safe first, everything else has low priority!
> 
> > Can you help me understand about why there is confusion about what's
> > been done by whom?  Are there multiple independent systems for doing
> > the translations?  Do you just do it differently because that's the
> > way you work?  I would think that we should have a system so that
> > translators can log on and see if anything needs to be done for their
> > language or if anybody has worked on it lately.  Does the system lack
> > that kind of work logging?
> 
> Let me try to explain.  Yes, there are multiple independent path for
> sending the translations.  The italian translation was empty.
> 
> You documentation says to send the po files here.  That's what i did.
> 
> https://docs.mailman3.org/en/latest/translation.html#internationalization-i18n

Well, when I wrote the above docs, what I was really aiming for was something 
along the lines of, "Please use Weblate for translations always but if you 
didn't see this doc and already have a .po file lying around from perhaps 
earlier efforts, I'll take the .po file and do the manual work of merging it 
saving our translators from re-doing the same efforts on Weblate".

I don't know if the current language actually conveys that message, but if not, 
I'll gladly accept fixes to the docs.

I didn't know this until literally just right now, but Weblate does allow you 
to upload translations into the web interface[1] from where it can just send us 
a Merge Request. I am going to update our documentation to reflect that instead 
of sending email here.

   [1]: 
https://docs.weblate.org/en/weblate-3.2.2/user/files.html#uploading-translations

Daniele, Do you think you'll be able to do that? The process is fairly straight 
forward, but you'd have to do that for each component. I can do it on your 
behalf if you aren't able to, but I want the author information to reflect your 
name (which it won't if I upload to Weblate), so it would be nice that you get 
credits for your awesome work!
 
> 
> The weblate system does not pick up the translation made until somebody
> merge them into the source.  So somebody unaware of my translations
> started the translation again.
> 
> Now, only 10/15 strings are translated using weblate, but it does not
> make any sense to do the work.  I suggest to overwrite with my po that
> are complete and somewhat coherent and discard the ones from weblate.
> Contacting the other translator would be a nice action to do, at least
> to explain what happened.  I will do it privately now, inviting him to
> join the list.
> 
> Before the overlap the step was simply to drop in my files, now maybe
> some merge step are required on weblate side. 

[Mailman-Developers] Re: italian translations

2020-04-10 Thread Stephen J. Turnbull
Daniele Pizzolli writes:

 > That's a waste of effort.  Please add/merge it soon.  Also any feedback
 > will be appreciated.

Sorry about this.  I think Abhilash (Cc'd) is the only person who
knows about the process for adding translations, and is also doing the
release engineering.  He lives and works in the San Francisco Bay
Area, which as you probably know has been a hot spot for COVID-19
infections.  I doubt he has much spare time for Mailman at the
moment.  I know I don't.

He has been more active on the mailing lists lately, so I hope there
will be more release news soon.  Please be patient.

Can you help me understand about why there is confusion about what's
been done by whom?  Are there multiple independent systems for doing
the translations?  Do you just do it differently because that's the
way you work?  I would think that we should have a system so that
translators can log on and see if anything needs to be done for their
language or if anybody has worked on it lately.  Does the system lack
that kind of work logging?

Steve
___
Mailman-Developers mailing list -- mailman-developers@python.org
To unsubscribe send an email to mailman-developers-le...@python.org
https://mail.python.org/mailman3/lists/mailman-developers.python.org/
Mailman FAQ: https://wiki.list.org/x/AgA3

Security Policy: https://wiki.list.org/x/QIA9