mirror of
https://github.com/d4rken-org/capod.git
synced 2026-09-15 02:36:12 -04:00
Every string in the three Android source files now carries a custom context written on Crowdin. A custom value is sticky per string: Crowdin stops re-deriving that string's context from its XML comment on later source pushes, so editing the comment in values/strings.xml silently reaches no one. Nothing in the tree recorded that, which makes the next comment edit a trap. The rule file is where a reader lands when they touch strings.xml, so it says where context is edited now.
1.4 KiB
1.4 KiB
description, paths
| description | paths | |
|---|---|---|
| Guidelines for adding and naming Android string resources |
|
Localization Guidelines
When adding new user-facing strings:
- Always use string resources: Never hardcode user-facing text in layouts or code
- Follow naming conventions: Use descriptive, hierarchical naming (e.g.,
profiles_name_default,settings_monitor_mode_label) - Provide context: String names should indicate usage and location
- Consider pluralization: Use Android plural resources (
<plurals>) when quantities vary
Naming Examples
profiles_create_title(screen title)profiles_name_label(form field label)profiles_name_default(default value)troubleshooter_ble_result_failure_title(status/error title)
Common prefixes currently in use: device_, settings_, support_, profiles_, press_, general_, pods_, upgrade_, widget_, debug_, permission_, troubleshooter_, overview_, anc_, onboarding_. There is no error_* prefix — error labels live under the relevant feature (e.g. general_error_label, troubleshooter_*_failure_*).
String context, character limits and file context are managed on Crowdin through the android-translation plugin's crowdin-annotate skill. XML comments in values/strings.xml no longer reach translators once a string's context has been written on Crowdin; change it there.