[aur-dev] [PATCH] Dedupe translatable strings
Signed-off-by: Lukas Fleischer
On 11/25/2015 02:36 AM, Lukas Fleischer wrote:
Signed-off-by: Lukas Fleischer
--- web/html/pkgdel.php | 2 +- web/html/pkgdisown.php | 2 +- web/html/pkgflag.php | 2 +- web/html/pkgmerge.php | 2 +- web/template/comaintainers_form.php | 2 +- web/template/pkgreq_close_form.php | 2 +- web/template/pkgreq_form.php | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/web/html/pkgdel.php b/web/html/pkgdel.php index c522e25..21a2677 100644 --- a/web/html/pkgdel.php +++ b/web/html/pkgdel.php @@ -12,7 +12,7 @@ html_header(__("Package Deletion"));
if (has_credential(CRED_PKGBASE_DELETE)): ?> <div class="box"> - <h2><?= __('Delete Package: %s', htmlspecialchars($pkgbase_name)) ?></h2> + <h2><?= __('Delete Package') ?>: <? htmlspecialchars($pkgbase_name) ?></h2>
It looks like you forgot to remove most of the closing parentheses, except this first one. -- Eli Schwartz
Hello. I don't know if it's the right place to express my opinion, but I can't find another place to do so. Strings should not be splitted like that, according to GNOME's guidelines [1] and KDE's guidlines [2], it's a bad practise to do that (even if it's just for removing a colon). 1: https://wiki.gnome.org/TranslationProject/DevGuidelines/Never%20split%20sent... 2: https://techbase.kde.org/Development/Tutorials/Localization/i18n_Mistakes#Pi... Regards, Safa
On 25/11, Safa Alfulaij wrote:
Hello. I don't know if it's the right place to express my opinion, but I can't find another place to do so. Strings should not be splitted like that, according to GNOME's guidelines [1] and KDE's guidlines [2], it's a bad practise to do that (even if it's just for removing a colon).
Those links talk about splitting sentences, which is not what is being done here. The colon isn't part of a sentence, it's just a separator, so is thus pretty irrelevant. -- Sincerely, Johannes Löthberg PGP Key ID: 0x50FB9B273A9D0BB5 https://theos.kyriasis.com/~kyrias/
2015-11-25 21:29 GMT+03:00 Johannes Löthberg
Those links talk about splitting sentences, which is not what is being done here. The colon isn't part of a sentence, it's just a separator, so is thus pretty irrelevant.
Sentences or strings refers to the same thing. It's not necessary to treat the translator as an end-user that shouldn't be aware/take care of placeholders or accelerators. And doing that would combine the strings with the same content as a single string, which might be impossible to translate because the context differs. Regards, Safa
On 25/11, Safa Alfulaij wrote:
2015-11-25 21:29 GMT+03:00 Johannes Löthberg
: Those links talk about splitting sentences, which is not what is being done here. The colon isn't part of a sentence, it's just a separator, so is thus pretty irrelevant.
Sentences or strings refers to the same thing.
No, it doesn't. Splitting sentences literally refers to taking a full sentence and then having parts of it be translated separately, which, again, is not the case here.
which might be impossible to translate because the context differs.
*If* that was the case here it would obviously be wrong to change it, yes, but it's the same context. -- Sincerely, Johannes Löthberg PGP Key ID: 0x50FB9B273A9D0BB5 https://theos.kyriasis.com/~kyrias/
On Wed, 25 Nov 2015 at 20:52:57, Safa Alfulaij wrote:
2015-11-25 21:29 GMT+03:00 Johannes Löthberg
: Those links talk about splitting sentences, which is not what is being done here. The colon isn't part of a sentence, it's just a separator, so is thus pretty irrelevant.
Sentences or strings refers to the same thing. It's not necessary to treat the translator as an end-user that shouldn't be aware/take care of placeholders or accelerators. And doing that would combine the strings with the same content as a single string, which might be impossible to translate because the context differs. [...]
I disagree. For example, the titles of our web pages are AUR (en) -- Home AUR (en) -- Packages AUR (en) -- Register [...] but there is absolutely no point in changing the strings from "Home", "Packages" and "Register" to "%s (%s) -- Home", "%s (%s) -- Packages" and "%s (%s) -- Register". In fact, this would be quite confusing for translators. The same applies here: We do not split any translatable strings but remove the separator and the package base name from the strings, thereby reducing the workload of translators. There is no context lost here. I even checked all translations before submitting this patch: None of them seems to change the ": %s" suffix to something else.
On 25/11/15 21:45, Lukas Fleischer wrote:
On Wed, 25 Nov 2015 at 20:52:57, Safa Alfulaij wrote:
Sentences or strings refers to the same thing. It's not necessary to treat the translator as an end-user that shouldn't be aware/take care of placeholders or accelerators. And doing that would combine the strings with the same content as a single string, which might be impossible to translate because the context differs. [...] I disagree. For example, the titles of our web pages are
AUR (en) -- Home AUR (en) -- Packages AUR (en) -- Register [...]
but there is absolutely no point in changing the strings from "Home", "Packages" and "Register" to "%s (%s) -- Home", "%s (%s) -- Packages" and "%s (%s) -- Register". In fact, this would be quite confusing for translators. The same applies here: We do not split any translatable strings but remove the separator and the package base name from the strings, thereby reducing the workload of translators. There is no context lost here. I can imagine there's some language where the right translation for "Delete Package: Foo" is something akin to"Foo package deletion", or "Deletion of Foo". Which is no longer possible.
I even checked all translations before submitting this patch: None of them seems to change the ": %s" suffix to something else. Good. But how to know such translation won't be desirable in a few months? What for instance about someone translating this sentence to a LTR language?
On Wed, 25 Nov 2015 at 16:54:59, Eli Schwartz wrote:
[...] It looks like you forgot to remove most of the closing parentheses, except this first one. [...]
Good catch, will amend that. Thanks!
Signed-off-by: Lukas Fleischer
participants (5)
-
Eli Schwartz
-
Johannes Löthberg
-
Linas
-
Lukas Fleischer
-
Safa Alfulaij