Project

General

Profile

Actions

Bug #42084

closed

Translation 'en' missing

Added by Daniel Alder over 11 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2012-10-17
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.6
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.

Actions #1

Updated by Xavier Perseguers over 11 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.

Actions #2

Updated by Daniel Alder over 11 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.

So l10n is totally meaningless for "en" and thats fools you in following situations:
  • 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?

Actions #3

Updated by Xavier Perseguers over 11 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

Actions #4

Updated by Daniel Alder over 11 years ago

Ok thanks here it is:
https://review.typo3.org/17414

Actions #5

Updated by Dmitry Dulepov over 11 years ago

plugin.tx_whatever._LOCAL_LANG.default.my_label = Hello, world!

Actions #6

Updated by Dmitry Dulepov over 11 years ago

Needs tests with llxmltranslate and translation server.

Actions #7

Updated by Daniel Alder over 11 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?

Actions #8

Updated by Daniel Alder over 11 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.

Actions #9

Updated by Dmitry Dulepov over 11 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.

Actions #10

Updated by Gerrit Code Review about 11 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

Actions #11

Updated by Gerrit Code Review about 11 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17414

Actions #12

Updated by Xavier Perseguers about 11 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.

Actions #13

Updated by Gerrit Code Review about 11 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

Actions #14

Updated by Gerrit Code Review about 11 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

Actions #15

Updated by Gerrit Code Review about 11 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

Actions #16

Updated by Daniel Alder about 11 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #17

Updated by Gerrit Code Review about 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

Actions #18

Updated by Christian Kuhn about 11 years ago

  • Status changed from Under Review to Resolved
Actions #19

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF