Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dots in translation keys in tl_iso_config.xlf #2327

Closed
ameotoko opened this issue Jul 16, 2022 · 4 comments
Closed

Dots in translation keys in tl_iso_config.xlf #2327

ameotoko opened this issue Jul 16, 2022 · 4 comments
Labels
Milestone

Comments

@ameotoko
Copy link
Contributor

This DCA definition has dots in options array elements, which means their respective translations had dots in translation keys before 2f713ff.

'currencyProvider' => array
(
'exclude' => true,
'inputType' => 'select',
'options' => array('ecb.int', 'admin.ch'),
'reference' => &$GLOBALS['TL_LANG']['tl_iso_config'],
'eval' => array('mandatory'=>true, 'tl_class'=>'w50'),

However, after converting to XLIFF in 2f713ff, this now is invalid, because XLIFF loader loads this like $GLOBALS['TL_LANG']['tl_iso_config']['currencyProvider']['ecb']['int'] instead of ['ecb.int']:

<trans-unit id="tl_iso_config.ecb.int">
<source>European Central Bank</source>
</trans-unit>
<trans-unit id="tl_iso_config.admin.ch">
<source>Swiss Federal Department of Finance</source>
</trans-unit>

The most obvious fix is probably replace ecb.int with ecb_int, but it would require migration, and I am not familiar with runonce system...

@aschempp
Copy link
Member

Can't we escape the name in the language file to tl_iso_config.admin\.ch?

@ameotoko
Copy link
Contributor Author

Escaping does not work in .xlf files, but it's possible to have a tl_iso_config.php file with just these two translations, along with tl_iso_config.xlf storing everything else. This works.

@aschempp aschempp added the bug label Aug 10, 2022
@aschempp aschempp added this to the 2.8.6 milestone Aug 10, 2022
@aschempp
Copy link
Member

I have applied a fix in a4148a8. Since we still handle the old DB values in the automater, and update would not break anything and a migration is not really necessary imho. You would need to select a new value when editing a config, but that's fine with me. Let me know if you disagree 🙃

@ameotoko
Copy link
Contributor Author

LGTM :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants