@Findus23 opened this Pull Request on August 14th 2022 Member

Inspired by https://netflixtechblog.com/pseudo-localization-netflix-12fff76fbcbe and others.
I think this helps a lot during testing. Unlike the "dev" language it is not completely unreadable and one can test features with it. Untranslated text immediately sticks out and issues with non-ASCII character should be more noticable than with English text.

Expanding the text by a factor (e.g. by duplicating every chacter with an n% chance) could also be added.

This is just a rough draft to show that the idea works. Of course it should become its separate language from the existing "dev".

grafik

Review

@github-actions[bot] commented on August 29th 2022 Contributor

If you don't want this PR to be closed automatically in 28 days then you need to assign the label 'Do not close'.

@sgiehl commented on September 5th 2022 Member

I like the idea. And we could even use it as replacement for the development language. That one is kind of useless, as it breaks most things due to missing placeholders.
Pushed a commit to avoid replacing stuff of the intl plugin, as otherwise the format strings are replaced and can be used anymore for number and date formatting...

@Findus23 commented on September 6th 2022 Member

That one is kind of useless, as it breaks most things due to missing placeholders.

That's true, but I feel like it has another very useful use case: You can very quickly find out how a translation string you see anywhere in Matomo is called. Especially for non-technical users and translators. So I would leave it as a separate thing.

I think there is just one larger issue with this code: It breaks HTML inside translation strings (which I think isn't that rare). And I can't think of a simple solution for that (I think laravel uses a full HTML parser with allowed attributes that get modified to solve the issue).

And semi-related, it would also be nice if we had a way to increase the length of strings to simulate (very often German) strings overflowing.

@sgiehl commented on September 7th 2022 Member

That's true, but I feel like it has another very useful use case: You can very quickly find out how a translation string you see anywhere in Matomo is called. Especially for non-technical users and translators. So I would leave it as a separate thing.

Even for that case it would need to be improved. The problem is, that all number formatting and date formatting won't work correctly anymore and in some places it might even cause php or javascript errors due to missing placeholders.
I actually never used it in the last years.

@github-actions[bot] commented on September 22nd 2022 Contributor

If you don't want this PR to be closed automatically in 28 days then you need to assign the label 'Do not close'.

Powered by GitHub Issue Mirror