elk-zone / elk

A nimble Mastodon web client
https://elk.zone
MIT License
5.45k stars 561 forks source link

Problems with the localization files #1488

Open osmaa opened 1 year ago

osmaa commented 1 year ago

While working on #1487 I noted the following issues:

broken templating

instead of using full sentences/paragraphs with embedded placeholders, these will be pre- or postfixed with something in code, which doesn't work for any language where a different sentence structure would be natural.

account.moved_count
comversation.with
help.desc_paraN
notification.favorited_post
notification.followed_you
notification.reblogged_post
notification.request_to_follow
notification.signed_up
notification.update_status
status.filter_hidden_phrase
status.filter_removed_phrase
status.someone
user.tip_no_account

Bad context

Used in multiple different contexts or in a context other than what the localization key would imply.

common.in
common.not_found
command.activate
compose.draft_title

menu.* (spread in multiple different menues) nav.* (used in both nav and in about screen) tab.posts (used by both profile and explore)

misc

Sometimes the localization phrases are full sentences and end with a period, other times they are not, for reasons that are unclear. Some others, like the About screen, break up paragraphs of text into one-line-per-key, which again doesn't work well if the target language would naturally use a different sentence structure.

unused keys

in at least fi.json, perhaps not automatically detected during build? Also, there doesn't appear to be any tooling to warn about untranslated new keys.

nav.select_feature_flags
nav.select_font_size
nav.select_language
placeholder.reply_to_account
placeholder.the_thread
interface.size_label
filter.filter_removed_phrase
stackblitz[bot] commented 1 year ago

Solve in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.