Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wallets: Make link labels translatable #1154

Open
xaur opened this issue Nov 6, 2023 · 1 comment
Open

wallets: Make link labels translatable #1154

xaur opened this issue Nov 6, 2023 · 1 comment

Comments

@xaur
Copy link
Contributor

xaur commented Nov 6, 2023

Currently link labels at https://decred.org/wallets/ are hardcoded in the wallets.yml file and cannot be translated, e.g. see https://decred.org/zh/wallets/

An idea how it could work is change wallets.yml to reference label keys from transifex_catalogs/en.json and move English strings to the latter. wallets.yml would change from:

  links:
    - title: Download and release notes
      url: https://github.com/crypto-power/cryptopower/releases/tag/release-v1.0.0
    - title: Website
      url: https://cryptopower.dev

to

  links:
    - label_key: wallets_cryptopower_release
      url: https://github.com/crypto-power/cryptopower/releases/tag/release-v1.0.0
    - label_key: wallets_cryptopower_website
      url: https://cryptopower.dev

and en.json would gain keys like:

{
  "wallets_cryptopower_release": "Download and release notes",
  "wallets_cryptopower_website": "Website"
}

@jholdstock is this feasible in Hugo?

@jholdstock
Copy link
Member

Yep. We would need to change title in wallets.yml to match a key in en.json. For example...

wallets.yml

  links:
    - string_id: cryptopower-release
      url: https://github.com/crypto-power/cryptopower/releases/tag/release-v1.0.0
    - string_id: cryptopower-website
      url: https://cryptopower.dev

en.json

"cryptopower-release" "Download and release notes",
"cryptopower-website": "Website",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants