ux icon indicating copy to clipboard operation
ux copied to clipboard

[Translator] Parent locales are not implemented (yet)

Open mkrauser opened this issue 1 year ago • 10 comments

I guess the ux-translator should behave like symfony. I notices that fallback-locales are not implemented yet:

see https://symfony.com/doc/current/translation.html#fallback-translation-locales

mkrauser avatar Jul 31 '24 07:07 mkrauser

Strictly speaking, fallback locales are implemented: https://github.com/symfony/ux/blob/03a85b5301c675076121b9e4664d0b29f3750d03/src/Translator/src/TranslationsDumper.php#L177

But I imagine you are refering to the parent locale system ? (en_GB -> en)

I don't think this is something implemented right now (@maelanleborgne correct me if i'm wrong)

Would you like to work on this feature @mkrauser ?

smnandre avatar Jul 31 '24 09:07 smnandre

Hi, maybe I did things wrong when implementing them, but they should be there:

  • https://github.com/symfony/ux/blob/2.x/src/Translator/assets/src/translator.ts#L135C11-L162
  • tests: https://github.com/symfony/ux/blob/2.x/src/Translator/assets/test/translator.test.ts#L412-L463

WDYM when saying "I notices that fallback-locales are not implemented yet", do you have some code to share with us?

Kocal avatar Jul 31 '24 11:07 Kocal

Hey,

we are using german ("de") as our main (and fallback) language and some message are "translated" to austria "de_AT". In PHP the fallback from "de_AT" to "de" works. In the ux-translator not. So I guess it is like @smnandre suspected:

But I imagine you are refering to the parent locale system ? (en_GB -> en)

I did not check the ux-code, I just suspected it was not implemented yet. Sorry for the confusion.

mkrauser avatar Aug 02 '24 10:08 mkrauser

Would you like to work on this feature @mkrauser ?

Yes, I would love to do that. But I'll be on vacation soon so it'll take a couple of weeks

mkrauser avatar Aug 02 '24 14:08 mkrauser

Thank you for this suggestion. There has not been a lot of activity here for a while. Would you still like to see this feature? Every feature is developed by the community. Perhaps someone would like to try? You can read how to contribute to get started.

carsonbot avatar Mar 01 '25 12:03 carsonbot

Friendly reminder that this issue exists. If I don't hear anything I'll close this.

carsonbot avatar Mar 15 '25 12:03 carsonbot

Hey,

I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen!

carsonbot avatar Mar 29 '25 12:03 carsonbot

Thank you for this suggestion. There has not been a lot of activity here for a while. Would you still like to see this feature? Every feature is developed by the community. Perhaps someone would like to try? You can read how to contribute to get started.

carsonbot avatar Sep 30 '25 12:09 carsonbot

Could I get an answer? If I do not hear anything I will assume this issue is resolved or abandoned. Please get back to me <3

carsonbot avatar Oct 14 '25 12:10 carsonbot

@carsonbot I'll take a look at this

mkrauser avatar Oct 20 '25 13:10 mkrauser