Customization: Translation slugs in JSON

Open
#994 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
json
Domain
localization

Research direction

Start by reading the current theme customization JSON and translation handling, then review the originating discussion in pull request 959. Done means agreeing on and implementing a translation-slug structure that removes redundant language sub-keys, supports future nested translations, and preserves customizable default values.

Written by the indexing model from the issue text.

Description

feature reusability

For the json to customize the theme, we could use
translation slugs instead of plain text for values.

Some reasons are:

  1. It could simplify things by removing the need for default, fr, en and similar sub-keys.

  2. It would also alleviate the burden of updating the full theme configuration when a new language is added, a process currently more involved than maintaining a flat JSON for translations.

  3. This shift would also enhance modularity and better separate responsibilities.

  4. It would allow translators of crowdin to properly translate the default values.

  5. It would reduce the size of the theming file significantly - potentially improving payload transfer speed and overall reactivity of the app

  6. It would allow nested translations to be integrated in the future, further reducing complexity and improving flexibility

Originally posted by @rvveber in https://github.com/suitenumerique/docs/pull/959#discussion_r2097689818

Dominant language
Python
Stars
16.8k
Forks
638
Avg merge
1d 15h
Merged PRs (30d)
40

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from suitenumerique/docs

All issues in suitenumerique/docs

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.