deckerst / aves

Aves is a gallery and metadata explorer app, built for Android with Flutter.
BSD 3-Clause "New" or "Revised" License
2.77k stars 106 forks source link

Add Shavian in Weblate | ๐‘จ๐‘› ยท๐‘–๐‘ฑ๐‘๐‘พ๐‘ฏ ๐‘ฆ๐‘ฏ ยท๐‘ข๐‘ง๐‘š๐‘ค๐‘ฑ๐‘‘ #1253

Closed JackknifedJuggernaut closed 2 weeks ago

JackknifedJuggernaut commented 1 month ago

Is your feature request related to a problem? Please describe No, it's related to localization.

Describe the solution you'd like Add Shavian-script version of English โ€“ the โ€œen_Shawโ€ locale, specifically โ€“ in Weblate; I can't do that myself.

Additional context I would like to translate the project to Shavian.

ย  ยฟ๐‘ฆ๐‘Ÿ ๐‘˜๐‘น ๐‘“๐‘ฐ๐‘—๐‘ผ ๐‘ฎ๐‘ฆ๐‘’๐‘ข๐‘ง๐‘•๐‘‘ ๐‘ฎ๐‘ฆ๐‘ค๐‘ฑ๐‘‘๐‘ฉ๐‘› ๐‘‘ ๐‘ฉ ๐‘๐‘ฎ๐‘ช๐‘š๐‘ค๐‘ฉ๐‘ฅ? ๐‘๐‘ค๐‘ฐ๐‘Ÿ ๐‘›๐‘ฆ๐‘•๐‘’๐‘ฎ๐‘ฒ๐‘š ๐‘ฏ๐‘ด, ๐‘ฆ๐‘‘'๐‘• ๐‘ฎ๐‘ฆ๐‘ค๐‘ฑ๐‘‘๐‘ฉ๐‘› ๐‘‘ ๐‘ค๐‘ด๐‘’๐‘ฉ๐‘ค๐‘ฒ๐‘Ÿ๐‘ฑ๐‘–๐‘ฉ๐‘ฏ.

๐‘›๐‘ฆ๐‘•๐‘’๐‘ฎ๐‘ฒ๐‘š ๐‘ž ๐‘•๐‘ฉ๐‘ค๐‘ต๐‘–๐‘ฉ๐‘ฏ ๐‘ฟ'๐‘› ๐‘ค๐‘ฒ๐‘’ ๐‘จ๐‘› ยท๐‘–๐‘ฑ๐‘๐‘พ๐‘ฏ-๐‘•๐‘’๐‘ฎ๐‘ฆ๐‘๐‘‘ ๐‘๐‘ป๐‘ ๐‘ฉ๐‘ฏ ๐‘ ยท๐‘ฆ๐‘™๐‘œ๐‘ค๐‘ฆ๐‘– โ€“ ๐‘ž ยซen_Shawยป ๐‘ค๐‘ด๐‘’๐‘ญ๐‘ค, ๐‘•๐‘๐‘ฉ๐‘•๐‘ฆ๐‘“๐‘ฆ๐‘’๐‘ค๐‘ฆ โ€“ ๐‘ฆ๐‘ฏ ยท๐‘ข๐‘ง๐‘š๐‘ค๐‘ฑ๐‘‘; ๐‘ฒ ๐‘’๐‘ญ๐‘ฏ'๐‘‘ ๐‘›๐‘ต ๐‘ž๐‘จ๐‘‘ ๐‘ฅ๐‘ฒ๐‘•๐‘ง๐‘ค๐‘“.

๐‘ฉ๐‘›๐‘ฆ๐‘–๐‘ฉ๐‘ฏ๐‘ฉ๐‘ค ๐‘’๐‘ช๐‘ฏ๐‘‘๐‘ง๐‘’๐‘•๐‘‘ ๐‘ฒ ๐‘ข๐‘ซ๐‘› ๐‘ค๐‘ฒ๐‘’ ๐‘‘ ๐‘‘๐‘ฎ๐‘จ๐‘ฏ๐‘Ÿ๐‘ค๐‘ฑ๐‘‘ ๐‘ž ๐‘๐‘ฎ๐‘ช๐‘ก๐‘ง๐‘’๐‘‘ ๐‘‘ ยท๐‘–๐‘ฑ๐‘๐‘พ๐‘ฏ.

deckerst commented 1 month ago

I've just added the language to the project on Aves. I'm surprised it wasn't available to you. Anyway, let me know how it goes.

Edit: Weblate made a mess. I'll need to take a look.

deckerst commented 1 month ago

@JackknifedJuggernaut I've added the locale files from code. Weblate seems usable, but it is confused and fails to gather all the project components under the same "English (Shavian)" language. Instead, the translation is split as follows:

You can contribute these translations. Do not attempt to create translations for the other component/language combinations.

deckerst commented 4 weeks ago

@JackknifedJuggernaut thanks for your contributions! I'm integrating your translation now.

It's all good on Aves side, but there are some basics that are not covered as this is an unusual transliteration, most importantly for the dates and units.

Could you please give me the transliteration for the following?

JackknifedJuggernaut commented 3 weeks ago

@deckerst Sure:

benji78 commented 3 weeks ago

Aves description in the IzzyOnDroid F-Droid repo is in Shavian language instead of english! Tested on F-Droid and Droid-ify.

deckerst commented 3 weeks ago

Haha, that's a funny side effect ^^

I'm off for a few days. In the meantime maybe you can check this with Izzy himself, see why they pick the locale en-Shaw rather than en-US.

TheLastProject commented 2 weeks ago

Ping @IzzySoft :)

IzzySoft commented 2 weeks ago

We just pick the entire fastlane tree, not specific locales. If the wrong one shows up in the client, that would be an error in either fdroidserver or fdroidclient then (as @benji78 tested on droid-ify as well, it must be fdroidserver then generating it wrong โ€“ but then the web repo browser should have the same issue).

If you talk about the repo-browser web interface: that looks fine to me (just tested: shows DE to me by default as my browser says so, shows en-US when requested. Setting the preferred language to en-US results in en-US as well.

REmains the question of what language preferences were set on the client? I've now checked the repo browser, Neo Store, F-Droid's official client โ€“ I cannot reproduce that, all of them show the English data fine.

benji78 commented 2 weeks ago

Thanks, I have figured it out. My phone is set to English United Kingdom which is therefore the default for all of my apps. I had tried setting the language from Default to English in Droid-ify (notice there is no localisation), but nothing changed (I guess it takes the phone's defined local which for me is UK). I my phone's settings I found a per app language setting and indeed after setting both F-Droid and Droid-ify to English (United States) Aves' description instantly changed to English. So the problem is en_uk does not exist and en_Shaw takes precedence over en_us as it is alphabetically first. So this occurs for every other English localisation that is not defined! (Australian, Canadian, Indian, ...)

As a side note, I never had any problem using the UK localisation until I saw Aves in Shavian (apart from some weird US "localization" from time to time ๐Ÿ˜‰).

benji78 commented 2 weeks ago

Is there a way to set en_us as the default? Otherwise adding Australian as a copy of US localisation could be a possible workaround.

IzzySoft commented 2 weeks ago

I guess there's nothing Thibault or I could do (apart from adding all possible localizations or remove all except for en-US and causing other complaints). If your "preferred language" is not present, en-US should be the default language picked โ€“ or rather, in this order: en-GB => en => en-US (similar with de-AT => de => en-US). But with en-GB set, and en-US present, en-Shaw should not be picked at all. Which is something the clients should take care for.

That said, what do you get visiting Aves at IzzyOnDroid's repo browser with your default setting of en-GB? I've just tried and got German (as my browser has de defined as a fallback language, and de is available).

licaon-kter commented 2 weeks ago

I saw https://expressional.social/@james/113403761943038968 but can't repro the issue in F-Droid Client

the website looks affected though https://f-droid.org/en/packages/deckers.thibault.aves.libre/

@deckerst from what I understood maybe you need to add the country code too, eg: en-US-Shaw

deckerst commented 2 weeks ago

I think I'll try something else: to rename the fastlane "en-US" folder to "en" (because it's the intended default anyway), and to configure Weblate so that it targets the same locale as before.

IzzySoft commented 2 weeks ago

Note that en-US is considered mandatory (at least by F-Droid) as it's the fallback for all locales not present (same at IzzyOnDroid) โ€“ so renaming en-US to en would have implication for a lot of locales. Not sure if they'd show anything at all then, unless explicitly covered by your fastlane. Making a symlink would work for F-Droid, and if you want to go that path I could establish that here manually.

deckerst commented 2 weeks ago

@IzzySoft Thanks for the heads-up about the required locale. So indeed renaming is not the way.

I am disappointed that these systems require this particular default en-US, but do not leverage it as expected. We witness this issue with en-Shaw, but it would be the same thing if it was en-CA, or anything coming alphabetically before en-US. It's not as obvious but it's just as wrong.

Making a symlink would work for F-Droid, and if you want to go that path I could establish that here manually.

Not sure I understand. Did you mean 1) submitting a PR to Aves to add the symlink, or 2) tweaking IzzyOnDroid / F-Droid to act as if there was a symlink in Aves repo fastlane tree?

Given past experience with Weblate, I'd say it will yell and break if it finds both en and en-US in the fastlane tree, because the Weblate project is already configured to treat both as the same locale. Note that in Weblate the Aves project is split in different components for different language/environments (Android, Dart, fastlane) where locales are encoded in different ways, so it's a bit fiddly to make Weblate happy with these locale equivalence.

IzzySoft commented 2 weeks ago

I am disappointed that these systems require this particular default en-US, but do not leverage it as expected. We witness this issue with en-Shaw, but it would be the same thing if it was en-CA, or anything coming alphabetically before en-US. It's not as obvious but it's just as wrong.

And there I thought the default was fixed to en-US. Strange enough with the "US" (one would expect a simple en instead, not country/region-specific). But then taking something random? Oof.

Symlink: IoD and FD deal differently with Fastlane. F-Droid builds from source, so it has your repo checked out and can simply copy the fastlane structure over. IoD on the other hand takes the APK you provide at releases, and utilizes the Forgejo/Github/GitLab APIs to fetch Fastlane. Unfortunately, the Github API is very strange when it comes to symlinks; I couldn't yet find a way to handle those. So at IoD, I'd simply add the symlink manually (our API would ignore it when pulling Fastlane, so it would persist) โ€“ while for F-Droid, the symlink must be in your repo as nobody can reach the ultra-secret build server we mere mortals are not supposed to know where it is located (if you don't understand this reference, I can solve the riddle for you by mail) to place the symlink thereโ€ฆ

because the Weblate project is already configured to treat both as the same locale.

Ouch. Then we have a problem here: you can neither use a symlink nor have en as a copy, as Weblate would go nutsโ€ฆ Well, not an issue with IzzyOnDroid (as here the symlink would only be locally on our side). But no way to get that fixed for Aves-libre at F-Droid.

Well, if you want me to, I can at least fix it for IzzyOnDroid, making a ln -s en-US en in Aves' fastlane tree here. Just let me know.

deckerst commented 2 weeks ago

With regards to F-Droid, do you think it's something they could look at? It seems to me their locale resolution strategy is broken, especially with such a required default.

An easy band-aid on my side would be to create en-CA (anything before "Shaw") and copy there the content of en-US. I'm hesitant to do it though, because it's not addressing the root cause.

IzzySoft commented 2 weeks ago

With regards to F-Droid, do you think it's something they could look at? It seems to me their locale resolution strategy is broken, especially with such a required default.

I doubt they'd see that as priority. There're issues in this context open for 5 years and more (e.g. never replace a 1.jpg by a 1.png in your fastlane; once deployed, you can never get rid of a screenshot; and you'll have to wait weeks or even months or longer for someone to clean that up manually, as.. well, I told you the build server is secret, did I? So who'd do the cleanup?). There's a comparable bug in the handling at IoD, but a) I'm fast to clean up when made aware of it, and b) with IoD you could do that yourself by dropping both 1.* files from your fastlane, push a release, and add the correct 1.* file back (or simply rename it to 1a.* so it gets fixed with a single release)โ€ฆ (I really need to kick the "screenshot optimizing feature" that converts PNG to JPG on certain conditions, so the cleanup would work properly โ€“ but yeah, I feel "bandwidth" an important factor โ€“ environment-wise as well as for not-so-privileged folks).

As for en-CA: I could symlink to that, too :stuck_out_tongue_winking_eye: But yeah, would not address the root cause. My question there is still: does it only affect the official F-Droid client โ€“ or all clients? I doubt it's a fdroidserver issue (the index simply holds all the locales; which to choose is the task of the client). Maybe other clients adopted the logic from the fdroidclient initially. Should the very problem show up e.g. with Neo Store, I'm confident Toni would investigate if we'd reach out to him.

deckerst commented 2 weeks ago

Thanks for all the details. Then I won't expect resolution from their side and will try the band-aidโ„ข for the next release.

As for other clients, actually I've just tried it myself (I have neo store and my first locale is en-uk) and... I see Shavian!

If I may, please do not fix it on IoD with the symlink, so we can quickly assess the efficacy of the band-aidโ„ข next time (your repo quickly picks up new releases while F-droid takes forever). And in the meantime people will get to discover Shavian... Or am I too easygoing?

licaon-kter commented 2 weeks ago

My question there is still: does it only affect the official F-Droid client โ€“ or all clients?

Wat?

IzzySoft commented 2 weeks ago

Wat?

Read above :wink:

please do not fix it on IoD with the symlink

OK, I'll keep my fingers away then.

licaon-kter commented 2 weeks ago

Read above ๐Ÿ˜‰

Read above above: https://github.com/deckerst/aves/issues/1253#issuecomment-2454245090

deckerst commented 2 weeks ago

@deckerst from what I understood maybe you need to add the country code too, eg: en-US-Shaw

I missed this suggestion. It's actually something I could try, as i think I know a way to make Weblate happy with this configuration.

JackknifedJuggernaut commented 1 week ago

That's a lot of people around here! This thread is both interesting and precedentially important, so I have a few things to say.

First of all, if I may, I'd like to quickly announce that Aves โ€“ as far as I'm aware of โ€“ is the first public application officially supporting Shavian, and for that I am thankful to @deckerst and his professionalism along the way. Although there were previous instances of โ€œshavingโ€ software, such as the ShawCraft resource pack for Minecraft: Java Edition by FriedOrange79 and the Shavian-centered Wordle-style game Shingo by hai!touch Studios, this specific case is the beginning of a full-on Shavian localization history. FLOSS is wonderful, y'all.

However, this topic is a bit more messy and philosophical than that. The thing is, translation is a profound activity, and there are a lot of decisions a thoughtful enough translator has to ponder and make. All the more so if grass is still green and untouched: with no path laid yet, a lot of forward-thinking is required. That's why I need to explain some of the stuff behind the scenes.

Firstly, by its nature Shavian script is phonemic, and that means that to a great extent spelling depends on pronunciation. Now on the other hand, English is a language of dialects โ€“ each has its own accent and, consequently, Shavian word forms. Personally, I lean more towards linguistic descriptivism and thus consider Shaw alphabet's ability to express one's own linguistic individualism to be a positive point. Yet I do realize that sometimes a universal option โ€“ a selective common ground โ€“ is needed, like in this case.

Secondly and contrarily, I can't help but notice that pretty much all of the existing software projects tend to use a single English locale; and the dialect being used is never explicitly marked too. And Aves, for one, is in that camp as well: the language list in settings contains โ€œEnglishโ€, when for the matter of fact it's โ€œEnglish (United States)โ€. Sure, most of the time the differences between varieties of the same language are insignificant and negligible, but there's definitely a gap for improvement in mindfulness of them and clarity. And in the context of Shavian, where accents affect word spellings drastically more, this matters a ton.

Thirdly and finally, I have to be clear myself: the current Shavian translation of Aves is indeed not written in American English; nor in British, nor in Australian, nor in any other natural dialect. Instead it represents a selective region-neutral artificial interdialect that is well-known and popular in the Shavian community. This is another reason why, in my opinion, renaming the Shavian locale to โ€œen-US-Shawโ€ (sorry, I know I'm a little late with this) is incorrect and would be a bad precedent for i18n.

All in all, since โ€œen-Shawโ€ causes problems, what do you think about โ€œen-XW-Shawโ€ IETF tag? The โ€œXWโ€ region code is a part of the extended ISO 3166-1 used by popular services like MusicBrainz and it stands for โ€œworldwideโ€. I think this goes well with the previous paragraph about interdialectal Shavian translation. Oh, and โ€œXโ€ is the antepenultimate letter of the Latin alphabet, forcing the locale to go after most of the other English ones.

P.S. Hm. Did you know that script should be explicitly written in IETF language tags if there's more than one of them being used? As with Chinese locales. So, in a better world โ€œen-USโ€ would have been โ€œen-US-Latnโ€. Honestly, I'd even argue that any language tags would benefit from that.

Strange enough with the "US" (one would expect a simple en instead, not country/region-specific).

It's not only strange, but also plain wrong. Some apps out there don't even follow norms of U.ย S. English despite using โ€œen-USโ€ locale. Too bad there is probably nothing we can do about this (apart from using Shavian, of course).

And in the meantime people will get to discover Shavian...

That would be beautifulโ€ฆ :-) I actually believe that Shavian is not just an amazing, masterfully-designed replacement for the Latin alphabet, but also a really convenient tool for privacy, which is something many open source and freedom advocates care for and value. Being able to hide from those screen peekers text content and language it's written in without the effort of having to learn a foreign one is massively underrated. Spread the word!

JackknifedJuggernaut commented 1 week ago

Regarding the Shavian translation itself: I checked the app update and have a few suggestions, which I don't think deserve a separate issue.

Due to the fact that Shavian is still English, it supports name translations. Therefore, consider adding to Weblate strings for the following phrases:

There are also some other things phrases left untranslated for seemingly no reason:

And think about adding months and days to Weblate, so that you don't have to ask manually.

That's it. Thank you for everything.

P.S. Actually, I wanted to ask something: are information units in Aves decimal or binary? If it's the former, there's an ambiguity; if it's the latter, the names should be โ€œKiBโ€, โ€œMiBโ€, โ€œGiBโ€, etc. Or maybe you could add an option for both in the settings. It's justโ€ฆ the amount of people that recognize kilobyte as 1024 bytes and second as 100 milliseconds is astonishing โ€“ we need to stop this.

deckerst commented 1 week ago

@JackknifedJuggernaut thanks for the interesting points

the language list in settings contains โ€œEnglishโ€, when for the matter of fact it's โ€œEnglish (United States)

True. But as soon as another dialect will be complete in Weblate, I'll clarify the dialects in the app. For now, "English" is sufficient as it refers to the worldwide default, i.e. US English.

what do you think about โ€œen-XW-Shawโ€ IETF tag?

Thanks for the suggestion, I'll use it.

antepenultimate

Nice.

consider adding to Weblate strings for the following phrases:

โ€œGitHubโ€ in the โ€œAboutโ€œ page
โ€œWorld Atlasโ€ in the โ€œAboutโ€ page
Open-source licenses' names in the โ€œAboutโ€ page
Text in the โ€œLicensesโ€ page (โ€œShow all licensesโ€ button)
License texts in the โ€œLicensesโ€ page
File format names in the media viewing page (JPEG, PNG, WEBM, etc.)

Some of these are automatically generated (the licenses), some shouldn't be translated or even transliterated (the file formats, which most often match file extensions in latin). The products and brands are debatable, but for now I don't intend to make them translatable, especially the ones you pointed, since GitHub is a pure English (Latin) site.

Abbreviated names of information units (KB, MB, GB, etc.)

Fair enough. Maybe in the future.

Text in the metadata section of the media viewing page (Exif, Huffman, JFIF, etc.)

Not gonna happen. That text comes from a dependency I use.

Text in the โ€œExplorerโ€ page (โ€œInternal shared storageโ€, โ€œDownloadโ€, etc.)

It's actually coming from your OS and storage labels. For "Download" it's trickier: as a folder I respect the folder label on storage, but as an album it's a standard album so it gets translated (like Camera and Screenshots).

And think about adding months and days to Weblate, so that you don't have to ask manually.

Nope. Most languages are already covered by the library that needs these translations. Only Shavian was missing because it's niche.

Actually, I wanted to ask something: are information units in Aves decimal or binary? If it's the former, there's an ambiguity; if it's the latter, the names should be โ€œKiBโ€, โ€œMiBโ€, โ€œGiBโ€, etc. Or maybe you could add an option for both in the settings.

Correctness is nice, but it sometimes needs to yield in favour of familiarity. So yes it's binary, but people are used to see KB and MB. Providing extra settings for everything is not a solution.