Bluesky app fork with some witchin' additions 馃挮 witchsky.app
bluesky fork client

Localization #38

open opened by dwn.poxiao-labs.work edited

Witchsky only modified the code part of social-app, and doesn't notice localization stuffs.

Bluesky uses Lingui as their tool extracting codes' strings to the src/locale/locales/en/messages.po file, and uses a GitHub Action workflow to do this: .github/workflows/nightly-update-source-languages.yaml. Bluesky then uses Crowdin to put the translation online.

The localization issue exists in a non-English user, as the "post" word changed into "skeet" but not in the messages file (and untranslated), many strings will be fallbacked into English.

Here's a plan I think:

  1. Auto-generate the English po file. Just a few lines of commands, but hard to implement now only in Tangled's pipelines.
  2. Use modified translations from social-app. That can be a complex job but can be done using a less-complex script. All the thing to do is replace "posts" into "skeets"

Also it's great to think if we need a Weblate or something.

OK now witchsky had an option to "Custom post phrase", simply by setting this with "post" (what Bluesky is using) and lot of strings are translated (as well as the "post" one exists in their po file)

So localization can be very simple for now:

  1. localize "custom post phrase" first, see what's "post" in other language, like in zh-CN it's 甯栨枃
  2. localize all newly-added strings

I'm not sure how a Weblate for a social-app fork would work. We usually try to never touch the messages.po files (where localization strings are stored) as the merge conflicts that arise from them are tremendous.

  1. english messages.po are auto generated in og social-app, while gh actions have a full pipelines in git commit, manually running yarn intl:extract, generated the en/messages.po

  2. yeah git often conflicts when machine hits machine. adding a .gitattributes to keep our weblate-generated messages.po may be good but destroy the sha-1 so we'd better revert our weblate-generated messages.po back just after merging from upstream, maybe

and all these things should be done after there's a way which tangled's pipelines can handle git commit

ok tryna build witchsky but better-sqlite3@10.1.0 sadly doesn't support my node v24 toolchain as it forced to use c++17 and v8 is c++20... it's even a dependency in @atproto/pds lol

https://github.com/bluesky-social/atproto/issues?q=is%3Aissue%20state%3Aopen%20better-sqlite woah

tryna use the node v22 and checkout to the version not implemented the vlm-generate alt-text then works, now in zh_CN the word "post" are translated to "甯栨枃" directly, not "the entire of the string keep the 'skeet' one"

now just let the "Custom post phrase" detect phrase from translations, hard-coding can be ok

ok the "Custom post phrase" is just a rabbit hole. The mod only fits English user to replace "post" and "skeet", but in other languages there's one "甯栨枃" or maybe more. so tryna implement en's messages.po first

sign up or login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:qvns4x6h3hl7cqygv5336grl/sh.tangled.repo.issue/3mdauy2mexe22