some translation issues
| Project: | Theme Settings |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | JohnAlbin |
| Status: | reviewed & tested by the community |
I found some critical translation issues...
1. The text inside the input boxes are translated into German if my site is German per default and i'm configuring the theme settings. This makes it impossible to have a clean translation base. i think this input text should be displayed in drupal's default and therefor 'english'. after a user edited the links he/she needs to use translation interface to translate this English strings to other languages. If you do different you will end up with a mix of links in all languages you have :-(((. Currently a very strange behavior... i know this is not perfect for usability, but looks like the only clean way.
2. I think “Read more” should be "Read more". I'm not sure what the policy is for english, but it was the first time i've seen curly quotes in an english POT file... same problem for single quotes. Example: Don’t show this link when “Read more” is present. If you have used this curly quotes for programming reasons, put a backslash before the quote and your problems are gone :-).
And finally a small usability suggestion, where i think text should be more intuitive:
1. text like "read more" link should have "read more" surrounded with doubles quotes. i've done this for German now, while it is somewhat difficult to build a good looking, sounding, *short* and understandable description without.

#1
As for the “clean translation base,” you can search for the english equivalents on /admin/settings/locale/string/search (using the German translations.)
Finally, I’m not sure I understand how you would “end up with a mix of links in all languages you have.” Can you explain?
#2
#1.
yes, and this is no problem at all.
that's the problem. We are on a way to have 10 or 20 languages in one drupal installation... one is default ok, but this default might change per user.
1. user 1 (defaults to german)
2. administer the links and write "Weiterlesen foo" (German), for the "read more foo" link.
3. the module save this string in variables table together with theme settings, but not in the locale tables and the string is in german.
4. new there is no english fall back string named "read more foo" in variables table that is usable for t()
5. user 2 (default english) now came in.
6. he overwrite the priior entered german string and the german string is lost, while overwritten by the user with an english string.
7. now user 3 (standard polish) don't like the english string in theme settings and overwrite again the english string saved in theme settings with polish string. again the english string is overwritten and lost.
8. now this ends up with one people have overwritten "Weiterlesen foo" with "read more foo" and a third time with a polish string. on another link someone else overwritten "new comment" with a german string and now - who should understand your site? one link german, one link polish and the other english.
What is required here is the drupal's default's (not core default's) must be english at all time, everywhere. after this english strings are in the system i'm able to translated to any other language and t() will then read the polish string for "read more foo" from locale tables and display the polish equivalent for the translated english string.
hope this is now more understandable. check out how t() works... it needs an english string - every time - and the locale tables save all translations referenced with this english string. if one translated string has been found - t() function translate the string for the user.
#2. not a problem, i only wonder why this is done if no other module is doing this... i'm the friend to keep everything same.
#3. after you changed this i must update the translation... so let me know before a release, please
#3
Okay, now I understand. Part of the issue is TS passes the saved settings to t(), but t() only works when passed an English language string (http://api.drupal.org/api/5/function/t). And admins are likely to enter the setting in their native language.
How are other system settings translated, such as the site slogan? Does an admin have to enter it as English and then translate it? That would be awful. I’ll have to investigate.
#4
I’ve moved the double-quote form text suggestion to #150156.
I looked at other system settings, like
site_sloganand these don’t appear to be translatable at all. Am I wrong?One solution would then be to remove the
t()from around the saved settings to make them just like regular systems settings (i.e. non-translatable.)Another solution is to add some documentation saying that if you want them translatable, enter them in English on the theme settings page and then translate them on the locale pages. Does that make sense?
I am, of course, open to other solutions as neither is ideal.
#5
This both sentences looks like one solution... if you remove the t() from the settings form input fields that should be the solution. then i'm able to save and edit English strings and translate them with locale module.
About the site_slogan, you are partly right. Localizer for example have a feature build in to translate them... as i remember the submodule is named "localizer_variables", i18n on the other side - requires to put some lines to settings.php, what is an awful solution.
#6
Okay, I’m going to look at this more carefully over the weekend. Thanks for the feedback, Alexander.
#7
Ok. Since I don’t have a website with multiple languages, someone else will have to review this patch.
If it works, I’ll commit it.
#8
I think the previous patch is insufficient. It only forced the default un-edited texts to be displayed in English.
This patch also attempts to translate the saved setting upon display in the node. It does not translate the saved setting when editing in the theme settings page.
I’m pretty sure this is the fix you are look for, Alexander. But can you give it a test before I commit it?
#9
Forgot to attach the new patch.
#10
The patch appears to be working and solved the problem we had with non-translated Read more links.
#11
Applied the patch, and the "Read more" link is now translatable! No side effects perceived. Online at www.zombies.parallelports.org. (No time to theme it in Zen, John!
ashamed)Thanks!