Project:GeSHi Filter for syntax highlighting
Version:6.x-1.x-dev
Component:User interface
Category:bug report
Priority:minor
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

This patch fixes all strings I have found while translating to German. They are not context sensitive and this will be fixed by this patch.

This does not fix all strings - what would require a full review (but no time for this now).

AttachmentSizeStatusTest resultOperations
D6_geshifilter_translatable_review1_2008122601.patch8.68 KBIgnored: Check issue status.NoneNone

Comments

#1

Missed one doc link. New patch attached.

AttachmentSizeStatusTest resultOperations
D6_geshifilter_translatable_review1_2008122602.patch10.67 KBIgnored: Check issue status.NoneNone

#2

Here is a backport to D5.

AttachmentSizeStatusTest resultOperations
D5_geshifilter_translatable_review1_2008122602.patch10.75 KBIgnored: Check issue status.NoneNone

#3

Priority:normal» minor
Status:needs review» needs work

Thank you for these (and sorry for the delay).

I already committed part of it in http://drupal.org/cvs?commit=236322

However, I left out some parts of your patch, namely things like

-      '#description' => t('Select the default line numbering scheme: no line numbers, normal line numbers or fancy line numbers. With fancy line numbers every n<sup>th</sup> line number is highlighted. (GeSHi documentation: !link).',
-        array('!link' => l('Line numbers', 'http://qbnz.com/highlighter/geshi-doc.html#line-numbers'))),
+      '#description' => t('Select the default line numbering scheme: no line numbers, normal line numbers or fancy line numbers. With fancy line numbers every n<sup>th</sup> line number is highlighted. (GeSHi documentation: <a href="!link">Line numbers</a>).',
+        array('!link' => 'http://qbnz.com/highlighter/geshi-doc.html#line-numbers')),
     );

The usage of t(...GeSHi documentation: !link) instead of t(...GeSHi documentation: <a href="!link">Line numbers</a>) (as you suggest) is intended (aka by design): the link links to a document in English, with English section titles (e.g. 'Line numbers'). As far as I know, there are no translations available for the GeSHi documentation, so I don't think it makes sense to make the link titles translatable, when the target is in English anyway.

Another one is

-      'description' => t('%cfilter is configured to "%escape", which is likely to cause propblems with %geshifilter.',
-        array('%cfilter' => $cfilter->name, '%geshifilter' => $geshifilter->name, '%escape' => t('Escape all tags'))),
-      'solution' => l(t('Configure HTML filtering to "%strip"', array('%strip' => t('Strip disallowed tags'))), "admin/settings/filters/$format/configure", array('html' => TRUE)),
+      'description' => t('%cfilter is configured to "Escape all tags", which is likely to cause problems with %geshifilter.',
+        array('%cfilter' => $cfilter->name, '%geshifilter' => $geshifilter->name)),
+      'solution' => l(t('Configure HTML filtering to "Strip disallowed tags"'), "admin/settings/filters/$format/configure", array('html' => TRUE)),

The rationale to do t(..."%escape"...) instead of t(..."Escape all tags"...) (as you suggest) is that the string "Escape all tags" is a string from Drupal core and typically already translated. I assume that using this available translation instead of re-i18n'ing it is easier for the translator (no double work or look up necessary) and it is better for consistency.

but I could be wrong here, as I am not a large scale translator (only Dutch for some module here and there).

#4

See http://api.drupal.org/api/function/t/6. We should have everything translatable and do not have context sensitive issues. t(..."Escape all tags"...) is a context sensitive string. It's always better to translate twice as this allows to have different meanings from context. In German you have often "der, die das" and this may result in context sensitive issues...

t(...GeSHi documentation: !link) is also wrong. Do not care about the link behind that is currently only available in English... maybe somedays it becomes available in German and than you only need to change the URL in the placeholder, but it wouldn't invalidate the translatable string. If translators decide to keep it in English they are free to keep it in English, but others are able to translate.

#5

Status:needs work» fixed

ok then :)
http://drupal.org/cvs?commit=236546

#6

#7

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here