[TYPO3-core] Confused about changes of XLF locale key

Søren Malling soren.malling at gmail.com
Mon Oct 7 11:17:58 CEST 2013


Hi Ernesto,

I've been investigating this further, and maybe I've found the issue,
please read:

Related forge issue: http://forge.typo3.org/issues/32214

Reading through the code it doesn't seems that the languages in
isoReverseMapping is never set as dependencies for the correct languagekey.

Taken from the pibase class, using language_alt depends on a calculated
dependency on different languagekeys

----------
                if (!empty($GLOBALS['TSFE']->config['config']['language']))
{
                        $this->LLkey =
$GLOBALS['TSFE']->config['config']['language'];
                        if
(empty($GLOBALS['TSFE']->config['config']['language_alt'])) {
                                /** @var $locales t3lib_l10n_Locales */
                                $locales =
t3lib_div::makeInstance('t3lib_l10n_Locales');
                                if (in_array($this->LLkey,
$locales->getLocales())) {
                                        $this->altLLkey = '';
                                        foreach
($locales->getLocaleDependencies($this->LLkey) as $language) {
                                                $this->altLLkey .=
$language . ',';
                                        }
                                        $this->altLLkey =
rtrim($this->altLLkey, ',');
                                }
                        } else {
                                $this->altLLkey =
$GLOBALS['TSFE']->config['config']['language_alt'];
                        }
                }
----------

But in the initialize function of Locales the dependency on the
reverseMapping is never calculated (is initlaize() suposed to be called
automatically or manual?)

----------
// Initializes the locale dependencies with TYPO3 supported locales
$instance->localeDependencies = array();
 foreach ($instance->languages as $locale => $name) {
if (strlen($locale) == 5) {
$instance->localeDependencies[$locale] = array(substr($locale, 0, 2));
 }
}
----------

It never touches $isoReverseMapping

Can anyone form the XLIFF team maybe see if I'm totally wrong on this?

Cheers

Søren


On Wed, Aug 21, 2013 at 3:01 PM, Ernesto Baschny
<ernesto.baschny at typo3.org>wrote:

> Hi Soren,
>
> thanks for looking into that! If you could, please document your
> findings and also what steps you needed to go through in the Smooth
> Migration issue tracker as a new issue so that we don't forget to
> document this.
>
> http://forge.typo3.org/projects/typo3cms-smoothmigration/issues
>
> Kind regards,
> Ernesto
>
> Am 2013-08-19 12:41, schrieb Søren Malling:
> > I think I found it in "Locales.php" -> isoReverseMapping
> >
> > Will dig into it - thanks for the pointer anyway :-)
> >
> > Cheers
> >
> >
> > On Mon, Aug 19, 2013 at 11:39 AM, Søren Malling <soren.malling at gmail.com
> > <mailto:soren.malling at gmail.com>> wrote:
> >
> >     Hi Xavier,
> >
> >     What part of the localization should i look for the fallback? The
> >     XliffParser or some more "core" related code?
> >
> >     Cheers
> >
> >     Søren
> >
> >
> >     On Mon, Aug 19, 2013 at 10:09 AM, Xavier Perseguers
> >     <xavier at typo3.org <mailto:xavier at typo3.org>> wrote:
> >
> >         Hi,
> >
> >         > One issue that we have come across in the change of locallang
> >         format
> >         > (from ll-XML to XLF) is that the danish language key has
> >         changed from
> >         > "dk" to "da".
> >         >
> >         > Can anyone confirm this?
> >
> >         Yes as we use official ISO codes, but I would have sworn that
> >         fallback
> >         was in place.
> >
> >         --
> >         Xavier Perseguers
> >         Release Manager TYPO3 4.6
> >
> >         TYPO3 .... inspiring people to share!
> >         Get involved: http://typo3.org
> >
> >         _______________________________________________
> >         Before posting to this list, please have a look to the posting
> rules
> >         on the following websites:
> >
> >         http://typo3.org/teams/core/core-mailinglist-rules/
> >         http://typo3.org/development/bug-fixing/diff-and-patch/
> >         _______________________________________________
> >         TYPO3-team-core mailing list
> >         TYPO3-team-core at lists.typo3.org
> >         <mailto:TYPO3-team-core at lists.typo3.org>
> >         http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-team-core
> >
> >
> >
> >     _______________________________________________
> >     Before posting to this list, please have a look to the posting rules
> >     on the following websites:
> >
> >     http://typo3.org/teams/core/core-mailinglist-rules/
> >     http://typo3.org/development/bug-fixing/diff-and-patch/
> >     _______________________________________________
> >     TYPO3-team-core mailing list
> >     TYPO3-team-core at lists.typo3.org <mailto:
> TYPO3-team-core at lists.typo3.org>
> >     http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-team-core
> >
> >
>
>
>
> --
> Ernesto Baschny
> TYPO3 CMS Core Developer
> Release Manager TYPO3 4.5 & 6.2 LTS
>
> TYPO3 .... inspiring people to share!
> Get involved: typo3.org
> _______________________________________________
> Before posting to this list, please have a look to the posting rules
> on the following websites:
>
> http://typo3.org/teams/core/core-mailinglist-rules/
> http://typo3.org/development/bug-fixing/diff-and-patch/
> _______________________________________________
> TYPO3-team-core mailing list
> TYPO3-team-core at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-team-core
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20131007/f344899d/attachment-0001.htm>


More information about the TYPO3-team-core mailing list