translation for 'Layer 1' (was: Re: Translations for 'default.svg' and 'Layer 1')
În data de Sun, 13 Jan 2019 17:16:47 +0100, Maren Hachmann a scris:
[...]
we need your help for the default templates translations:
[...]
Step 2:
Please visit https://gitlab.com/inkscape/inkscape/blob/master/share/templates/create_defa...
and check if there is a translation for 'Layer 1' in the list.
Cannot remember what I have done in 2019, but for sure in Inkscape 1.0 the 'Layer 1' in Romanian UI is still 'Layer 1' (the dropdown list button at the bottom of a new drawing).
The above link points to the master generic repository and I have no idea where should I look for that (un)translation for RO.
Any idea ?
Thank you, Cristi
субота, 14 листопада 2020 р. 23:20:35 EET Cristian Secară написано:
În data de Sun, 13 Jan 2019 17:16:47 +0100, Maren Hachmann a scris:
[...]
we need your help for the default templates translations:
[...]
Step 2:
Please visit https://gitlab.com/inkscape/inkscape/blob/master/share/templates/create_de faults.pl
and check if there is a translation for 'Layer 1' in the list.
Cannot remember what I have done in 2019, but for sure in Inkscape 1.0 the 'Layer 1' in Romanian UI is still 'Layer 1' (the dropdown list button at the bottom of a new drawing).
The above link points to the master generic repository and I have no idea where should I look for that (un)translation for RO.
Any idea ?
Thank you, Cristi
Please sign in into your gitlab account first.
Then read this page:
https://wiki.inkscape.org/wiki/index.php/Interface_translation
Hope this helps.
Best regards, Yuri
În data de Sat, 14 Nov 2020 23:27:01 +0200, Yuri Chornoivan a scris:
Please sign in into your gitlab account first.
Then read this page:
https://wiki.inkscape.org/wiki/index.php/Interface_translation
Correct me if I'm wrong, but that wiki is only about the .po file (and the sting for 'Layer 1' template is not in the .po file).
Cristi
The translation for that term is part of the main Inkscape po file now, the template creation script looks for it as "Layer" in that place.
Maren
Am 14.11.20 um 23:08 schrieb Cristian Secară:
În data de Sat, 14 Nov 2020 23:27:01 +0200, Yuri Chornoivan a scris:
Please sign in into your gitlab account first.
Then read this page:
https://wiki.inkscape.org/wiki/index.php/Interface_translation
Correct me if I'm wrong, but that wiki is only about the .po file (and the sting for 'Layer 1' template is not in the .po file).
Cristi
În data de Sat, 14 Nov 2020 23:46:40 +0100, Maren Hachmann a scris:
The translation for that term is part of the main Inkscape po file now, the template creation script looks for it as "Layer" in that place.
Hm. So, for the current release, there is no chance to update somewhere that string ? (assuming someone wants to compile the current version)
(but ok for the master)
Cristi
If the word 'Layer' is translated in the standard po file for 1.0.x / 1.0.1, it should already automatically be available. It is for me.
Maren
Am 15.11.20 um 00:07 schrieb Cristian Secară:
În data de Sat, 14 Nov 2020 23:46:40 +0100, Maren Hachmann a scris:
The translation for that term is part of the main Inkscape po file now, the template creation script looks for it as "Layer" in that place.
Hm. So, for the current release, there is no chance to update somewhere that string ? (assuming someone wants to compile the current version)
(but ok for the master)
Cristi
În data de Sun, 15 Nov 2020 16:40:50 +0100, Maren Hachmann a scris:
If the word 'Layer' is translated in the standard po file for 1.0.x / 1.0.1, it should already automatically be available. It is for me.
Well, something is strange here.
I checked my .po file (and also re-updated with the current .pot file from 1.0.x in GitLab) and I have no 'Layer' or 'Layer [something]' untranslated at the beginning of any string. Also the default.ro.svg file already contains the required translated strings for Layer word. That said, when I launch Inkscape, the document says 'Layer 1' (i.e. in English) both on bottom dropdown and on layers pane.
However, I replaced directly the inkscape.mo file from the ro locale directory with the one from the de locale directory: now when I launch Inkscape, the document says 'Ebene 1' (or 'Calque 1' for file from fr locale directory etc.).
So, there is "something" in the .po file that triggers the translation for Layer name on new documents, with that "something" being different than the word Layer itself (or so it seems to me).
Will try to dig further. My translation for 1.0.x is overall at 61%, so – for the issue raised here – I have to find a shorter way to find out where the problem comes from (otherwise I have to wait until I translate the remaining 3300 strings :)
Cristi
So, the English template is used. I just dug a bit deeper into the code and found that you need to translate the term "en" to "ro" to benefit from the translated template file.
Maren
Am 15.11.20 um 21:53 schrieb Cristian Secară:
În data de Sun, 15 Nov 2020 16:40:50 +0100, Maren Hachmann a scris:
If the word 'Layer' is translated in the standard po file for 1.0.x / 1.0.1, it should already automatically be available. It is for me.
Well, something is strange here.
I checked my .po file (and also re-updated with the current .pot file from 1.0.x in GitLab) and I have no 'Layer' or 'Layer [something]' untranslated at the beginning of any string. Also the default.ro.svg file already contains the required translated strings for Layer word. That said, when I launch Inkscape, the document says 'Layer 1' (i.e. in English) both on bottom dropdown and on layers pane.
However, I replaced directly the inkscape.mo file from the ro locale directory with the one from the de locale directory: now when I launch Inkscape, the document says 'Ebene 1' (or 'Calque 1' for file from fr locale directory etc.).
So, there is "something" in the .po file that triggers the translation for Layer name on new documents, with that "something" being different than the word Layer itself (or so it seems to me).
Will try to dig further. My translation for 1.0.x is overall at 61%, so – for the issue raised here – I have to find a shorter way to find out where the problem comes from (otherwise I have to wait until I translate the remaining 3300 strings :)
Cristi
În data de Mon, 16 Nov 2020 02:17:18 +0100, Maren Hachmann a scris:
So, the English template is used. I just dug a bit deeper into the code and found that you need to translate the term "en" to "ro" to benefit from the translated template file.
Found it:
#. TRANSLATORS: 'en' is an ISO 639-1 language code. #. Replace with language code for your language, i.e. the name of your .po file #: ../src/file.cpp:895 ../src/io/resource.cpp:154 ../src/io/resource.cpp:159 #: ../src/verbs.cpp:2375 msgid "en"
For some reason it was "translated" also as en, changed to ro and is ok now.
Thank you, Cristi
Great! It was an interesting find for me, too - I'd have thought that the language abbreviation would be inferred automatically.
Take care, Maren
Am 16.11.20 um 14:37 schrieb Cristian Secară:
În data de Mon, 16 Nov 2020 02:17:18 +0100, Maren Hachmann a scris:
So, the English template is used. I just dug a bit deeper into the code and found that you need to translate the term "en" to "ro" to benefit from the translated template file.
Found it:
#. TRANSLATORS: 'en' is an ISO 639-1 language code. #. Replace with language code for your language, i.e. the name of your .po file #: ../src/file.cpp:895 ../src/io/resource.cpp:154 ../src/io/resource.cpp:159 #: ../src/verbs.cpp:2375 msgid "en"
For some reason it was "translated" also as en, changed to ro and is ok now.
Thank you, Cristi
IMO, the problem is the string definition itself, even though a comment for translators is specified in the .po file (but obviously easily overseen):
'en' is an ISO 639-1 language code. Replace with language code for your language, i.e. the name of your .po file
I do agree with Maren, that this string should ideally be "translated" automatically in some way. I'm not a programmer … maybe by using the file prefix of the .po file?? So maybe it's possible to get rid of this string altogether …
Milo
16.11.2020., u 16:02, Maren Hachmann maren@goos-habermann.de je napisao:
Great! It was an interesting find for me, too - I'd have thought that the language abbreviation would be inferred automatically.
Take care, Maren
Am 16.11.20 um 14:37 schrieb Cristian Secară:
În data de Mon, 16 Nov 2020 02:17:18 +0100, Maren Hachmann a scris:
So, the English template is used. I just dug a bit deeper into the code and found that you need to translate the term "en" to "ro" to benefit from the translated template file.
Found it:
#. TRANSLATORS: 'en' is an ISO 639-1 language code. #. Replace with language code for your language, i.e. the name of your .po file #: ../src/file.cpp:895 ../src/io/resource.cpp:154 ../src/io/resource.cpp:159 #: ../src/verbs.cpp:2375 msgid "en"
For some reason it was "translated" also as en, changed to ro and is ok now.
Thank you, Cristi
Inkscape Translators mailing list -- inkscape-translator@lists.inkscape.org To unsubscribe send an email to inkscape-translator-leave@lists.inkscape.org
Another idea I have is to use the languages in the "LINGUAS" file to determine the language …
Milo
16.11.2020., u 20:34, Milo mail mail@milotype.de je napisao:
IMO, the problem is the string definition itself, even though a comment for translators is specified in the .po file (but obviously easily overseen):
'en' is an ISO 639-1 language code. Replace with language code for your language, i.e. the name of your .po file
I do agree with Maren, that this string should ideally be "translated" automatically in some way. I'm not a programmer … maybe by using the file prefix of the .po file?? So maybe it's possible to get rid of this string altogether …
Milo
16.11.2020., u 16:02, Maren Hachmann maren@goos-habermann.de je napisao:
Great! It was an interesting find for me, too - I'd have thought that the language abbreviation would be inferred automatically.
Take care, Maren
Am 16.11.20 um 14:37 schrieb Cristian Secară:
În data de Mon, 16 Nov 2020 02:17:18 +0100, Maren Hachmann a scris:
So, the English template is used. I just dug a bit deeper into the code and found that you need to translate the term "en" to "ro" to benefit from the translated template file.
Found it:
#. TRANSLATORS: 'en' is an ISO 639-1 language code. #. Replace with language code for your language, i.e. the name of your .po file #: ../src/file.cpp:895 ../src/io/resource.cpp:154 ../src/io/resource.cpp:159 #: ../src/verbs.cpp:2375 msgid "en"
For some reason it was "translated" also as en, changed to ro and is ok now.
Thank you, Cristi
Inkscape Translators mailing list -- inkscape-translator@lists.inkscape.org To unsubscribe send an email to inkscape-translator-leave@lists.inkscape.org
Inkscape Translators mailing list -- inkscape-translator@lists.inkscape.org To unsubscribe send an email to inkscape-translator-leave@lists.inkscape.org
On second thought, LINGUAS file distinguishes "localized" translations … for instance: - en_AU - en_CA - en_GB
Hmmm … to bad I'm not a programmer, so I don't know if my initial idea with LINGUAS file works ...
Sorry, Milo
16.11.2020., u 21:49, Milo mail mail@milotype.de je napisao:
Another idea I have is to use the languages in the "LINGUAS" file to determine the language …
Milo
16.11.2020., u 20:34, Milo mail mail@milotype.de je napisao:
IMO, the problem is the string definition itself, even though a comment for translators is specified in the .po file (but obviously easily overseen):
'en' is an ISO 639-1 language code. Replace with language code for your language, i.e. the name of your .po file
I do agree with Maren, that this string should ideally be "translated" automatically in some way. I'm not a programmer … maybe by using the file prefix of the .po file?? So maybe it's possible to get rid of this string altogether …
Milo
16.11.2020., u 16:02, Maren Hachmann maren@goos-habermann.de je napisao:
Great! It was an interesting find for me, too - I'd have thought that the language abbreviation would be inferred automatically.
Take care, Maren
Am 16.11.20 um 14:37 schrieb Cristian Secară:
În data de Mon, 16 Nov 2020 02:17:18 +0100, Maren Hachmann a scris:
So, the English template is used. I just dug a bit deeper into the code and found that you need to translate the term "en" to "ro" to benefit from the translated template file.
Found it:
#. TRANSLATORS: 'en' is an ISO 639-1 language code. #. Replace with language code for your language, i.e. the name of your .po file #: ../src/file.cpp:895 ../src/io/resource.cpp:154 ../src/io/resource.cpp:159 #: ../src/verbs.cpp:2375 msgid "en"
For some reason it was "translated" also as en, changed to ro and is ok now.
Thank you, Cristi
Inkscape Translators mailing list -- inkscape-translator@lists.inkscape.org To unsubscribe send an email to inkscape-translator-leave@lists.inkscape.org
Inkscape Translators mailing list -- inkscape-translator@lists.inkscape.org To unsubscribe send an email to inkscape-translator-leave@lists.inkscape.org
Hi all,
to quickly chime in here (I'm the one who implemented this part of the code): Detecting the language code automatically would obviously be the ideal case. Unfortunately there's actually not an easy way (at least none that I'm aware of) to detect the translation that ultimately is being used from within Inkscape code! This part is automagically handled by a third-party library (gettext) which will pick the language that appears most suitable on the user's system (the choice depends on a multitude of locale settings compared against the list of available translations, taking locale variants and dialects into account). In other words: gettext picks a translation file based on a non-trivial internal logic and returns translated strings without Inkscape even being aware of the specific locale that is used eventually.
Short of re-implementing the logic of gettext and hoping to get it right (otherwise one might end up with a localized template when Inkscape is set to English or vice-versa) the easiest way to determine the language code turned out to be to simply ask gettext to translate the string "en" (which all of this is about).
I initially "translated" all of these for all languages (by using a script), so translators would not have to worry about this. It's possible some of the strings got lost again while syncing translations at a later point, though.
Cheers Patrick
Am 16.11.2020 um 23:52 schrieb Milo mail:
On second thought, LINGUAS file distinguishes "localized" translations … for instance:
- en_AU
- en_CA
- en_GB
Hmmm … to bad I'm not a programmer, so I don't know if my initial idea with LINGUAS file works ...
Sorry, Milo
16.11.2020., u 21:49, Milo mail mail@milotype.de je napisao:
Another idea I have is to use the languages in the "LINGUAS" file to determine the language …
Milo
16.11.2020., u 20:34, Milo mail mail@milotype.de je napisao:
IMO, the problem is the string definition itself, even though a comment for translators is specified in the .po file (but obviously easily overseen):
'en' is an ISO 639-1 language code. Replace with language code for your language, i.e. the name of your .po file
I do agree with Maren, that this string should ideally be "translated" automatically in some way. I'm not a programmer … maybe by using the file prefix of the .po file?? So maybe it's possible to get rid of this string altogether …
Milo
16.11.2020., u 16:02, Maren Hachmann maren@goos-habermann.de je napisao:
Great! It was an interesting find for me, too - I'd have thought that the language abbreviation would be inferred automatically.
Take care, Maren
Am 16.11.20 um 14:37 schrieb Cristian Secară:
În data de Mon, 16 Nov 2020 02:17:18 +0100, Maren Hachmann a scris:
So, the English template is used. I just dug a bit deeper into the code and found that you need to translate the term "en" to "ro" to benefit from the translated template file.
Found it:
#. TRANSLATORS: 'en' is an ISO 639-1 language code. #. Replace with language code for your language, i.e. the name of your .po file #: ../src/file.cpp:895 ../src/io/resource.cpp:154 ../src/io/resource.cpp:159 #: ../src/verbs.cpp:2375 msgid "en"
For some reason it was "translated" also as en, changed to ro and is ok now.
Thank you, Cristi
Inkscape Translators mailing list -- inkscape-translator@lists.inkscape.org To unsubscribe send an email to inkscape-translator-leave@lists.inkscape.org
Inkscape Translators mailing list -- inkscape-translator@lists.inkscape.org To unsubscribe send an email to inkscape-translator-leave@lists.inkscape.org
Inkscape Translators mailing list -- inkscape-translator@lists.inkscape.org To unsubscribe send an email to inkscape-translator-leave@lists.inkscape.org
Hi Patrick,
thank you for the explanation, looks like this was the best choice, then.
(and good to see you again! We've been missing you.)
Maren
Am 17.11.20 um 18:41 schrieb Patrick Storz:
Hi all,
to quickly chime in here (I'm the one who implemented this part of the code): Detecting the language code automatically would obviously be the ideal case. Unfortunately there's actually not an easy way (at least none that I'm aware of) to detect the translation that ultimately is being used from within Inkscape code! This part is automagically handled by a third-party library (gettext) which will pick the language that appears most suitable on the user's system (the choice depends on a multitude of locale settings compared against the list of available translations, taking locale variants and dialects into account). In other words: gettext picks a translation file based on a non-trivial internal logic and returns translated strings without Inkscape even being aware of the specific locale that is used eventually.
Short of re-implementing the logic of gettext and hoping to get it right (otherwise one might end up with a localized template when Inkscape is set to English or vice-versa) the easiest way to determine the language code turned out to be to simply ask gettext to translate the string "en" (which all of this is about).
I initially "translated" all of these for all languages (by using a script), so translators would not have to worry about this. It's possible some of the strings got lost again while syncing translations at a later point, though.
Cheers Patrick
Am 16.11.2020 um 23:52 schrieb Milo mail:
On second thought, LINGUAS file distinguishes "localized" translations … for instance:
- en_AU
- en_CA
- en_GB
Hmmm … to bad I'm not a programmer, so I don't know if my initial idea with LINGUAS file works ...
Sorry, Milo
16.11.2020., u 21:49, Milo mail mail@milotype.de je napisao:
Another idea I have is to use the languages in the "LINGUAS" file to determine the language …
Milo
16.11.2020., u 20:34, Milo mail mail@milotype.de je napisao:
IMO, the problem is the string definition itself, even though a comment for translators is specified in the .po file (but obviously easily overseen):
'en' is an ISO 639-1 language code. Replace with language code for your language, i.e. the name of your .po file
I do agree with Maren, that this string should ideally be "translated" automatically in some way. I'm not a programmer … maybe by using the file prefix of the .po file?? So maybe it's possible to get rid of this string altogether …
Milo
16.11.2020., u 16:02, Maren Hachmann maren@goos-habermann.de je napisao:
Great! It was an interesting find for me, too - I'd have thought that the language abbreviation would be inferred automatically.
Take care, Maren
Am 16.11.20 um 14:37 schrieb Cristian Secară:
În data de Mon, 16 Nov 2020 02:17:18 +0100, Maren Hachmann a scris:
> So, the English template is used. I just dug a bit deeper into the > code and found that you need to translate the term "en" to "ro" to > benefit from the translated template file. Found it:
#. TRANSLATORS: 'en' is an ISO 639-1 language code. #. Replace with language code for your language, i.e. the name of your .po file #: ../src/file.cpp:895 ../src/io/resource.cpp:154 ../src/io/resource.cpp:159 #: ../src/verbs.cpp:2375 msgid "en"
For some reason it was "translated" also as en, changed to ro and is ok now.
Thank you, Cristi
Inkscape Translators mailing list -- inkscape-translator@lists.inkscape.org To unsubscribe send an email to inkscape-translator-leave@lists.inkscape.org
Inkscape Translators mailing list -- inkscape-translator@lists.inkscape.org To unsubscribe send an email to inkscape-translator-leave@lists.inkscape.org
Inkscape Translators mailing list -- inkscape-translator@lists.inkscape.org To unsubscribe send an email to inkscape-translator-leave@lists.inkscape.org
În data de Tue, 17 Nov 2020 18:58:11 +0100, Maren Hachmann a scris:
thank you for the explanation, looks like this was the best choice, then.
The current approach has a potential flaw (or so I think).
Ok, it works as intended when the overall program language follows the OS language and the corresponding .po file is constructed properly.
However, when forcing a particular language from Inkscape preferences, the UI changes accordingly, but the wording in a new document remains still as the OS language (at least in Windows).
Cannot appreciate if this is really a bad thing, though.
Cristi
The chosen template will also change accordingly when forcing a language. (Note that it does not affect previously saved documents)
Am 17.11.2020 um 19:55 schrieb Cristian Secară:
În data de Tue, 17 Nov 2020 18:58:11 +0100, Maren Hachmann a scris:
thank you for the explanation, looks like this was the best choice, then.
The current approach has a potential flaw (or so I think).
Ok, it works as intended when the overall program language follows the OS language and the corresponding .po file is constructed properly.
However, when forcing a particular language from Inkscape preferences, the UI changes accordingly, but the wording in a new document remains still as the OS language (at least in Windows).
Cannot appreciate if this is really a bad thing, though.
Cristi
În data de Tue, 17 Nov 2020 20:05:01 +0100, Patrick Storz a scris:
The chosen template will also change accordingly when forcing a language.
Yes, you are right. It seems I messed up some of my other settings earlier, when I was trying to find out the reason for <subj.>.
Sorry for the confusion, Cristi
participants (5)
-
Cristian Secară
-
Maren Hachmann
-
Milo mail
-
Patrick Storz
-
Yuri Chornoivan