Bug #42084
closedTranslation 'en' missing
100%
Description
Since Typo3 4.6 (to 6.0) this line breaks the translation handling:
t3lib\l10n\class.t3lib_l10n_factory.php #90
This is completely wrong 'cause you're never able to translate an english label again.
In theory the 'default' label is not a 'translation'. It's just a placeholder who's telling the translator what the label is standing for (in english of course). But the 'real' english translation should be in the 'en' translation.
So in fact the 'en' translation in l10n will not be parsed.
Updated by Xavier Perseguers about 12 years ago
- Status changed from New to Needs Feedback
Please describe your use case and tell us why if something is wrong in English we should not change the "placeholder" instead of creating a "real" English translation.
Updated by Daniel Alder about 12 years ago
Xavier Perseguers wrote:
Please describe your use case and tell us why if something is wrong in English we should not change the "placeholder" instead of creating a "real" English translation.
For example:
the "default" label in the extension is "label1" an its text "text1"
the only way to change the label "label1" to "text2" is using TS (whats a bad practise) or change the label within the extension locallang itself in the "default" section.
reason: the l10n folder is not working anymore for "en" because it will always set to "default". On the other hand "default" is not supported in l10n.
- extension is from the communitiy (translations will be overwritten on every update)
- if the extension is under version control you have to commit source 'cause of language changes to keep source up-to-date
Or am I missing some kind of alternative to change labels independantly from the extensions source?
Besides:
the translation handling should be simplified/unified/extended. Is there already a discussion running?
Updated by Xavier Perseguers about 12 years ago
Your description makes sense. Could you come up with a patch to remove this line 90. We should test it and make sure existing unit tests still work as before, and most probably write a few new ones to check the "new" behaviour.
Make sure to think about this way as well:
http://xavier.perseguers.ch/en/tutorials/typo3/articles/managing-localization-files.html
Updated by Daniel Alder almost 12 years ago
Ok thanks here it is:
https://review.typo3.org/17414
Updated by Dmitry Dulepov almost 12 years ago
plugin.tx_whatever._LOCAL_LANG.default.my_label = Hello, world!
Updated by Dmitry Dulepov almost 12 years ago
Needs tests with llxmltranslate and translation server.
Updated by Daniel Alder almost 12 years ago
in theory "_LOCAL_LANG.default" works as expected:
it's a fault of the concept 'cause it's overwriting the $this->LOCAL_LANG['default']. So if you don't use an l10n 'en' file labels will be outputted from TS.
But if you are using a l10n 'en' entry the 'en' is the primary key, not 'default' (see $GLOBALS['TSFE']->config['config']['language']). So not the "_LOCAL_LANG.default" label will be shown but the l10n.
but please visit:
http://wiki.typo3.org/TypoScript_language_additions,_override
It's wrong with or without my patch: [language:default|de|en|...]
Without the patch just 'default' is working not 'en'
With my patch 'en' is working, 'default' not.
So tell me what's correct? And if both 'default' & 'en' should work. Which one is prefered?
I am comming up with a patch if the question will be answerd.
The problem is located in the "pi_loadLL" function.
...something tells me, that the typo3 community has no unit how the translation handling should work. documentation, logic, code and people, everything is full of contradiction.
wouldn't it be better to start with overthinking the whole translation handling?
Updated by Daniel Alder almost 12 years ago
...don't take it personally but:
llxmltranslate is not part of the core.
nobody showed consideration for snowbabel, since this issue breaks it completely.
Updated by Dmitry Dulepov almost 12 years ago
Yes, llxmltranslate is not a part of the core but it is the official translation tool for the older versions. So we have to check. And translation server must still work properly with these changes.
Updated by Gerrit Code Review almost 12 years ago
- Status changed from Needs Feedback to Under Review
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17414
Updated by Gerrit Code Review almost 12 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17414
Updated by Xavier Perseguers almost 12 years ago
Dmitry Dulepov wrote:
Yes, llxmltranslate is not a part of the core but it is the official translation tool for the older versions. So we have to check. And translation server must still work properly with these changes.
No problem with the translation server. Translation server (pootle) is working with a "template" source language which is "English" for us and then can translate in other languages. English as se never appears.
We are changing the behaviour of TYPO3 starting from 4.6, so for older versions, there is no side-effect.
Updated by Gerrit Code Review almost 12 years ago
Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/18262
Updated by Gerrit Code Review almost 12 years ago
Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/18263
Updated by Gerrit Code Review almost 12 years ago
Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at https://review.typo3.org/18264
Updated by Daniel Alder almost 12 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 8df3441a757f2aa5c10348ca432bcc98f565e448.
Updated by Gerrit Code Review over 11 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch master_new has been pushed to the review server.
It is available at https://review.typo3.org/18653
Updated by Christian Kuhn over 11 years ago
- Status changed from Under Review to Resolved