Fuzzy translations

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Fuzzy translations

Hannie Dumoleyn
Although the documentation string freeze will be on March 16th, I
already want to start translating untranslated strings here: [1].

In this version (Zesty) I noticed that there are untranslated strings
which were translated in a previous version. Example: string
#112=untranslated, but it is translated in 16.04 version.

Before I start merging these versions manually and upload them to
Launchpad, I would like to know if there is another way to get fuzzy
translations in a newer version based on an older one.

Hannie

[1]
https://translations.launchpad.net/ubuntu/zesty/+source/ubuntu-docs/+pots/ubuntu-help/nl/+translate


--
ubuntu-translators mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-translators
Reply | Threaded
Open this post in threaded view
|

Re: Fuzzy translations

Ask Hjorth Larsen
Hi Hannie

I am pretty sure the only way is to export both po-files and merge them offline (msgmerge). Lack of fuzzy support is a continuing scandal of launchpad, but does not seem to be a priority with the powers that be.

If the old one is not available anymore (frequently the case for ordinary modules) then there may not be a way at all.

Best regards
Ask

El 9 mar. 2017 9:35, "Hannie Dumoleyn" <[hidden email]> escribió:
Although the documentation string freeze will be on March 16th, I already want to start translating untranslated strings here: [1].

In this version (Zesty) I noticed that there are untranslated strings which were translated in a previous version. Example: string #112=untranslated, but it is translated in 16.04 version.

Before I start merging these versions manually and upload them to Launchpad, I would like to know if there is another way to get fuzzy translations in a newer version based on an older one.

Hannie

[1] https://translations.launchpad.net/ubuntu/zesty/+source/ubuntu-docs/+pots/ubuntu-help/nl/+translate


--
ubuntu-translators mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-translators

--
ubuntu-translators mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-translators
Reply | Threaded
Open this post in threaded view
|

Re: Fuzzy translations

Gunnar Hjalmarsson
In reply to this post by Hannie Dumoleyn
Hi Hannie,

On 2017-03-09 09:35, Hannie Dumoleyn wrote:
> Although the documentation string freeze will be on March 16th, I
> already want to start translating untranslated strings here: [1].

Great. I'm going to start the Swedish translation soon. Please note that
there will be a few more new/changed strings which land at doc string
freeze on March 16.

> In this version (Zesty) I noticed that there are untranslated strings
> which were translated in a previous version. Example: string
> #112=untranslated, but it is translated in 16.04 version.

Well, there was a tiny change of that string, which explains it. The
translation was not dropped arbitrarily.

> Before I start merging these versions manually and upload them to
> Launchpad,

Since the strings are not identical, I'm not sure I understand how
merging would help.

> I would like to know if there is another way to get fuzzy
> translations in a newer version based on an older one.

If you download the zesty PO file, you see a lot of fuzzy translations
at the bottom of the file - including the string which starts with "A
small web user interface".

Unfortunately the fuzzy translations are not shown in the LP web interface.

--
Gunnar Hjalmarsson
https://launchpad.net/~gunnarhj

--
ubuntu-translators mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-translators
Reply | Threaded
Open this post in threaded view
|

Re: Fuzzy translations

Gunnar Hjalmarsson
In reply to this post by Ask Hjorth Larsen
Hi Ask!

On 2017-03-09 10:05, Ask Hjorth Larsen wrote:
> I am pretty sure the only way is to export both po-files and merge
> them offline (msgmerge).

I doubt that would help; please see my reply to Hannie. Or am I missing
something?

--
Gunnar Hjalmarsson
https://launchpad.net/~gunnarhj

--
ubuntu-translators mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-translators
Reply | Threaded
Open this post in threaded view
|

Re: Fuzzy translations

Fòram na Gàidhlig
Sgrìobh Gunnar Hjalmarsson na leanas 09/03/2017 aig 11:38:
> Hi Ask!
>
> On 2017-03-09 10:05, Ask Hjorth Larsen wrote:
>> I am pretty sure the only way is to export both po-files and merge
>> them offline (msgmerge).
>
> I doubt that would help; please see my reply to Hannie. Or am I missing
> something?

msgmerge has an option --no-fuzzy-matching, so it obviously can do fuzzy
matches.

I always download my translations and load them into Virtaal just to
make sure that I have everything in my local translation memory. Of
course, our locale has only 2 localizers, so keeping my TM up to date is
less of an issue as for languages with many contributors.

--
ubuntu-translators mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-translators
Reply | Threaded
Open this post in threaded view
|

Re: Fuzzy translations

Ask Hjorth Larsen
2017-03-09 15:15 GMT+01:00 Fòram na Gàidhlig <[hidden email]>:

> Sgrìobh Gunnar Hjalmarsson na leanas 09/03/2017 aig 11:38:
>> Hi Ask!
>>
>> On 2017-03-09 10:05, Ask Hjorth Larsen wrote:
>>> I am pretty sure the only way is to export both po-files and merge
>>> them offline (msgmerge).
>>
>> I doubt that would help; please see my reply to Hannie. Or am I missing
>> something?
>
> msgmerge has an option --no-fuzzy-matching, so it obviously can do fuzzy
> matches.

To elaborate, msgmerge is the mechanism by which fuzzies are
always(-ish) generated when source code is updated.  It simply
fuzzy-matches all current strings against all previous strings when
the translations are updated from the source tree.

Best regards
Ask


>
> I always download my translations and load them into Virtaal just to
> make sure that I have everything in my local translation memory. Of
> course, our locale has only 2 localizers, so keeping my TM up to date is
> less of an issue as for languages with many contributors.
>
> --
> ubuntu-translators mailing list
> [hidden email]
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-translators

--
ubuntu-translators mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-translators
Reply | Threaded
Open this post in threaded view
|

Re: Fuzzy translations

Gunnar Hjalmarsson
On 2017-03-09 20:15, Ask Hjorth Larsen wrote:
> To elaborate, msgmerge is the mechanism by which fuzzies are
> always(-ish) generated when source code is updated.  It simply
> fuzzy-matches all current strings against all previous strings when
> the translations are updated from the source tree.

Thanks for clarifying. I slowly get the picture. ;)

Furthermore, I think I was wrong in my reply to Hannie: The translations
at the bottom of the PO files are *old* translations, which you may make
use of manually, but they are not really fuzzy entries. As you already
pointed out, Launchpad doesn't do that.

--
Gunnar Hjalmarsson
https://launchpad.net/~gunnarhj

--
ubuntu-translators mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-translators
Reply | Threaded
Open this post in threaded view
|

Re: Fuzzy translations

Ask Hjorth Larsen
2017-03-10 0:32 GMT+01:00 Gunnar Hjalmarsson <[hidden email]>:

> On 2017-03-09 20:15, Ask Hjorth Larsen wrote:
>>
>> To elaborate, msgmerge is the mechanism by which fuzzies are
>> always(-ish) generated when source code is updated.  It simply
>> fuzzy-matches all current strings against all previous strings when
>> the translations are updated from the source tree.
>
>
> Thanks for clarifying. I slowly get the picture. ;)
>
> Furthermore, I think I was wrong in my reply to Hannie: The translations at
> the bottom of the PO files are *old* translations, which you may make use of
> manually, but they are not really fuzzy entries. As you already pointed out,
> Launchpad doesn't do that.

Right.  For no particular reason here is some more info :)

When generating/updating po-file from source code, gettext parses the
source code to recognize translatable strings.

When this process starts, there are still 0 strings, and all
translations are effectively "obsolete" for the moment.

For each string in the source code, gettext checks whether an obsolete
(or existing) string *exactly* matches that string.  If it does, that
string will appear as translated (and will be removed from obsoletes).
If it does not match exactly, it will instead do a fuzzy match, and
the string will be fuzzy.  Else the string will be untranslated.
Gettext has no idea whether a particular string was "changed" or is
"new" - all it knows is if it resembles a previous string or not.

So the po-file is rebuilt from the old one, and most old translations
will (normally) be matched exactly, some will be fuzzy, and any that
were never matched will be obsolete.

A consequence of this is that if some day the programmer reintroduces
a string, it will immediately be translated again, provided it exactly
matches an obsolete.  (Or it could be fuzzy if it is only similar.)

(I have not verified all of the above behaviour 100%, but it is true
enough for household purposes.)

Best regards
Ask

>
> --
> Gunnar Hjalmarsson
> https://launchpad.net/~gunnarhj
>
> --
> ubuntu-translators mailing list
> [hidden email]
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-translators

--
ubuntu-translators mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-translators
Reply | Threaded
Open this post in threaded view
|

Re: Fuzzy translations

Krzysztof Tataradziński
If anyone interested in fuzzy translations, there is a bug https://bugs.launchpad.net/launchpad/+bug/1591941

2017-03-10 0:56 GMT+01:00 Ask Hjorth Larsen <[hidden email]>:
2017-03-10 0:32 GMT+01:00 Gunnar Hjalmarsson <[hidden email]>:
> On 2017-03-09 20:15, Ask Hjorth Larsen wrote:
>>
>> To elaborate, msgmerge is the mechanism by which fuzzies are
>> always(-ish) generated when source code is updated.  It simply
>> fuzzy-matches all current strings against all previous strings when
>> the translations are updated from the source tree.
>
>
> Thanks for clarifying. I slowly get the picture. ;)
>
> Furthermore, I think I was wrong in my reply to Hannie: The translations at
> the bottom of the PO files are *old* translations, which you may make use of
> manually, but they are not really fuzzy entries. As you already pointed out,
> Launchpad doesn't do that.

Right.  For no particular reason here is some more info :)

When generating/updating po-file from source code, gettext parses the
source code to recognize translatable strings.

When this process starts, there are still 0 strings, and all
translations are effectively "obsolete" for the moment.

For each string in the source code, gettext checks whether an obsolete
(or existing) string *exactly* matches that string.  If it does, that
string will appear as translated (and will be removed from obsoletes).
If it does not match exactly, it will instead do a fuzzy match, and
the string will be fuzzy.  Else the string will be untranslated.
Gettext has no idea whether a particular string was "changed" or is
"new" - all it knows is if it resembles a previous string or not.

So the po-file is rebuilt from the old one, and most old translations
will (normally) be matched exactly, some will be fuzzy, and any that
were never matched will be obsolete.

A consequence of this is that if some day the programmer reintroduces
a string, it will immediately be translated again, provided it exactly
matches an obsolete.  (Or it could be fuzzy if it is only similar.)

(I have not verified all of the above behaviour 100%, but it is true
enough for household purposes.)

Best regards
Ask


--
ubuntu-translators mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-translators
Reply | Threaded
Open this post in threaded view
|

Re: Fuzzy translations

Hannie Dumoleyn
I have downloaded ubuntu-help xenial (100% translated) and zesty (Untranslated: 252), merged the two, and the result was this: Not ready 171, Untranslated 83.
I checked and approved the fuzzies in Lokalize (my favourite CAT), this doesn't take much time, and uploaded the new file to Launchpad.
All we have to do now is translate the remaining 83 messages (instead of 252!!) in Launchpad.
Hannie


Op 13-03-17 om 15:06 schreef Krzysztof T:
If anyone interested in fuzzy translations, there is a bug https://bugs.launchpad.net/launchpad/+bug/1591941

2017-03-10 0:56 GMT+01:00 Ask Hjorth Larsen <[hidden email]>:
2017-03-10 0:32 GMT+01:00 Gunnar Hjalmarsson <[hidden email]>:
> On 2017-03-09 20:15, Ask Hjorth Larsen wrote:
>>
>> To elaborate, msgmerge is the mechanism by which fuzzies are
>> always(-ish) generated when source code is updated.  It simply
>> fuzzy-matches all current strings against all previous strings when
>> the translations are updated from the source tree.
>
>
> Thanks for clarifying. I slowly get the picture. ;)
>
> Furthermore, I think I was wrong in my reply to Hannie: The translations at
> the bottom of the PO files are *old* translations, which you may make use of
> manually, but they are not really fuzzy entries. As you already pointed out,
> Launchpad doesn't do that.

Right.  For no particular reason here is some more info :)

When generating/updating po-file from source code, gettext parses the
source code to recognize translatable strings.

When this process starts, there are still 0 strings, and all
translations are effectively "obsolete" for the moment.

For each string in the source code, gettext checks whether an obsolete
(or existing) string *exactly* matches that string.  If it does, that
string will appear as translated (and will be removed from obsoletes).
If it does not match exactly, it will instead do a fuzzy match, and
the string will be fuzzy.  Else the string will be untranslated.
Gettext has no idea whether a particular string was "changed" or is
"new" - all it knows is if it resembles a previous string or not.

So the po-file is rebuilt from the old one, and most old translations
will (normally) be matched exactly, some will be fuzzy, and any that
were never matched will be obsolete.

A consequence of this is that if some day the programmer reintroduces
a string, it will immediately be translated again, provided it exactly
matches an obsolete.  (Or it could be fuzzy if it is only similar.)

(I have not verified all of the above behaviour 100%, but it is true
enough for household purposes.)

Best regards
Ask

>
> --
> Gunnar Hjalmarsson
> https://launchpad.net/~gunnarhj
>





--
ubuntu-translators mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-translators
Reply | Threaded
Open this post in threaded view
|

Re: Fuzzy translations

Ask Hjorth Larsen
Glad to hear that this has been useful. Imagine how much time goes to waste because launchpad lacks fuzzy support. Of course it does not matter for most UI strings because they are short anyway, but documentation or anything else that involves whole sentences is completely unsuited for launchpad.

Best regards
Ask


El 15 mar. 2017 9:19 a. m., "Hannie Dumoleyn" <[hidden email]> escribió:
I have downloaded ubuntu-help xenial (100% translated) and zesty (Untranslated: 252), merged the two, and the result was this: Not ready 171, Untranslated 83.
I checked and approved the fuzzies in Lokalize (my favourite CAT), this doesn't take much time, and uploaded the new file to Launchpad.
All we have to do now is translate the remaining 83 messages (instead of 252!!) in Launchpad.
Hannie


Op 13-03-17 om 15:06 schreef Krzysztof T:
If anyone interested in fuzzy translations, there is a bug https://bugs.launchpad.net/launchpad/+bug/1591941

2017-03-10 0:56 GMT+01:00 Ask Hjorth Larsen <[hidden email]>:
2017-03-10 0:32 GMT+01:00 Gunnar Hjalmarsson <[hidden email]>:
> On 2017-03-09 20:15, Ask Hjorth Larsen wrote:
>>
>> To elaborate, msgmerge is the mechanism by which fuzzies are
>> always(-ish) generated when source code is updated.  It simply
>> fuzzy-matches all current strings against all previous strings when
>> the translations are updated from the source tree.
>
>
> Thanks for clarifying. I slowly get the picture. ;)
>
> Furthermore, I think I was wrong in my reply to Hannie: The translations at
> the bottom of the PO files are *old* translations, which you may make use of
> manually, but they are not really fuzzy entries. As you already pointed out,
> Launchpad doesn't do that.

Right.  For no particular reason here is some more info :)

When generating/updating po-file from source code, gettext parses the
source code to recognize translatable strings.

When this process starts, there are still 0 strings, and all
translations are effectively "obsolete" for the moment.

For each string in the source code, gettext checks whether an obsolete
(or existing) string *exactly* matches that string.  If it does, that
string will appear as translated (and will be removed from obsoletes).
If it does not match exactly, it will instead do a fuzzy match, and
the string will be fuzzy.  Else the string will be untranslated.
Gettext has no idea whether a particular string was "changed" or is
"new" - all it knows is if it resembles a previous string or not.

So the po-file is rebuilt from the old one, and most old translations
will (normally) be matched exactly, some will be fuzzy, and any that
were never matched will be obsolete.

A consequence of this is that if some day the programmer reintroduces
a string, it will immediately be translated again, provided it exactly
matches an obsolete.  (Or it could be fuzzy if it is only similar.)

(I have not verified all of the above behaviour 100%, but it is true
enough for household purposes.)

Best regards
Ask

>
> --
> Gunnar Hjalmarsson
> https://launchpad.net/~gunnarhj
>





--
ubuntu-translators mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-translators


--
ubuntu-translators mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-translators
Reply | Threaded
Open this post in threaded view
|

Re: Fuzzy translations

Hannie Dumoleyn
Hi Ask,
I totally agree with what you say here. I do not know if it is very complicated to add fuzzy support in Launchpad. I will try to contact a developer to see what can be done.
Hannie

Op 15-03-17 om 18:02 schreef Ask Hjorth Larsen:
Glad to hear that this has been useful. Imagine how much time goes to waste because launchpad lacks fuzzy support. Of course it does not matter for most UI strings because they are short anyway, but documentation or anything else that involves whole sentences is completely unsuited for launchpad.

Best regards
Ask


El 15 mar. 2017 9:19 a. m., "Hannie Dumoleyn" <[hidden email]> escribió:
I have downloaded ubuntu-help xenial (100% translated) and zesty (Untranslated: 252), merged the two, and the result was this: Not ready 171, Untranslated 83.
I checked and approved the fuzzies in Lokalize (my favourite CAT), this doesn't take much time, and uploaded the new file to Launchpad.
All we have to do now is translate the remaining 83 messages (instead of 252!!) in Launchpad.
Hannie


Op 13-03-17 om 15:06 schreef Krzysztof T:
If anyone interested in fuzzy translations, there is a bug https://bugs.launchpad.net/launchpad/+bug/1591941

2017-03-10 0:56 GMT+01:00 Ask Hjorth Larsen <[hidden email]>:
2017-03-10 0:32 GMT+01:00 Gunnar Hjalmarsson <[hidden email]>:
> On 2017-03-09 20:15, Ask Hjorth Larsen wrote:
>>
>> To elaborate, msgmerge is the mechanism by which fuzzies are
>> always(-ish) generated when source code is updated.  It simply
>> fuzzy-matches all current strings against all previous strings when
>> the translations are updated from the source tree.
>
>
> Thanks for clarifying. I slowly get the picture. ;)
>
> Furthermore, I think I was wrong in my reply to Hannie: The translations at
> the bottom of the PO files are *old* translations, which you may make use of
> manually, but they are not really fuzzy entries. As you already pointed out,
> Launchpad doesn't do that.

Right.  For no particular reason here is some more info :)

When generating/updating po-file from source code, gettext parses the
source code to recognize translatable strings.

When this process starts, there are still 0 strings, and all
translations are effectively "obsolete" for the moment.

For each string in the source code, gettext checks whether an obsolete
(or existing) string *exactly* matches that string.  If it does, that
string will appear as translated (and will be removed from obsoletes).
If it does not match exactly, it will instead do a fuzzy match, and
the string will be fuzzy.  Else the string will be untranslated.
Gettext has no idea whether a particular string was "changed" or is
"new" - all it knows is if it resembles a previous string or not.

So the po-file is rebuilt from the old one, and most old translations
will (normally) be matched exactly, some will be fuzzy, and any that
were never matched will be obsolete.

A consequence of this is that if some day the programmer reintroduces
a string, it will immediately be translated again, provided it exactly
matches an obsolete.  (Or it could be fuzzy if it is only similar.)

(I have not verified all of the above behaviour 100%, but it is true
enough for household purposes.)

Best regards
Ask

>
> --
> Gunnar Hjalmarsson
> https://launchpad.net/~gunnarhj
>





--
ubuntu-translators mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-translators



--
ubuntu-translators mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-translators
Reply | Threaded
Open this post in threaded view
|

Re: Fuzzy translations

Gunnar Hjalmarsson
In reply to this post by Hannie Dumoleyn
On 2017-03-15 09:18, Hannie Dumoleyn wrote:
> I have downloaded ubuntu-help xenial (100% translated) and zesty
> (Untranslated: 252), merged the two, and the result was this: Not
> ready 171, Untranslated 83.
> I checked and approved the fuzzies in Lokalize (my favourite CAT),
> this doesn't take much time, and uploaded the new file to Launchpad.
> All we have to do now is translate the remaining 83 messages (instead
> of 252!!) in Launchpad.

I used this method for the Swedish ubuntu-help translation, and it
proved to be very helpful, since there are quite a few small changes to
multi-sentence strings in zesty.

Many thanks for sharing the method, and thanks to Ask for explaining it
further so even I understand. :)

--
Gunnar Hjalmarsson
https://launchpad.net/~gunnarhj

--
ubuntu-translators mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-translators