flathub-infra / website

Monorepo with website and API
https://flathub.org
Apache License 2.0
218 stars 83 forks source link

"Get it on string" in badges page #2717

Open yakushabb opened 5 months ago

yakushabb commented 5 months ago

The "Get it on" string on badge pages looks good in English.

Unfortunately, it's a split sentence.

Do not translate it literally. Keep it as short as possible. It should be a call to action. It's always followed by "Flathub", so for example, "Get it on Flathub".

As you guessed, it's problematic in non-SVO languages like Turkish (an SOV language).

A proper translation might be a sentence similar to the following:

"Flathub'dan Edin"

"Flathub'dan Al"

"Flathub İle Kur"

/Reported by Berk Elyesa

Beryesa commented 5 months ago

Thanks for reporting, it's really broken for many SOV languages like Japanese, Turkish, Korean, Hindi... etc indeed. I made a little page for a broader overview, hope it's helpful

Flathub-badge-i18n

Little ping @jimmac xP

bragefuglseth commented 1 month ago

The App Store approach with variable badge length is probably hard to pull off with SVG.

For the translation part, though, I think it would be smart to keep it as one string divided into three lines:

Get it on\n
Flathub\n

Then a language with reverse line ordering could do:

\n
Flathub’dan\n
Edin

This would make the context and usage clear to translators, and the translated strings could be split at \n and applied based on which lines are empty/filled. If both the upper and bottom lines contain text, something is wrong, and the translator should be notified about it.

bragefuglseth commented 1 month ago

FWIW I’d be interested in working on this once the details have been decided on properly.

razzeee commented 1 month ago

I think weblate will warn/error if the source translation has special strings such as \n and your translation misses them. So that could work, but needs us to verify this. The easiest way would without breaking anything, would probably be creating that translation in addition to what we have and maybe create a copy of the api, that's using that translation.

If we've confirmed it's working, wait for / migrate translations and then remove the current implementation and replace it with the newer.