Reorganize and refactor strings.xml

This commit re-organizes `lawn/`'s `strings.xml` code files for clarity and also adds a simple naming scheme. The strings will probably be renamed soon, since I don't have the time to do all of that
This commit is contained in:
SuperDragonXD
2024-06-22 18:30:45 +08:00
parent 739c2e5afa
commit 9aac523fc4
22 changed files with 465 additions and 344 deletions

View File

@@ -23,7 +23,6 @@ Please make sure to be civil during discussion of your contribution (refer to th
For translation, visit [Lawnchair on Crowdin](https://lawnchair.crowdin.com) and follow these tips:
- When using quotation marks, insert the symbols specific to the target language, as listed in this [this summary table](https://en.wikipedia.org/wiki/Quotation_mark#Summary_table);
- Lawnchair uses title case for some English UI text while other languages do not use title case; opt for sentence case instead;
- Some English terminology may have not have commonly-used equivalents in other languages. In such cases, use short descriptive phrases—for example, the equivalent of _bottom row_ for _dock_;
- Some languages (e.g. French) have variations of words depending if it's masculine or feminine (gender-specific); we recommend opting for gender-neutral words instead.
@@ -97,3 +96,16 @@ See the table below detailing the release type:
| Beta | 02 |
| Release Candidate | 03 |
| Release | 04 |
#### String naming
Strings `names` in `strings.xml` should follow this format:
| Type | Format | Example usage | Actual string | Other information |
|--------------------------------------------------|-------------------|----------------------------|----------------------|---------------------------------------------------------------------------------------------------------------------|
| Generic word | $1 | `disagree_or_agree` | Disagree or agree | Should only be used if it doesn't fit the below categories |
| Action | $1_action | `apply_action` | Apply | Any generic action verb can fit here |
| Preference or popup label<br/>Preference headers | $1_label | `folders_label` | Folders | |
| Preference or popup description | $1_description | `folders_description` | Row and column count | |
| Preference choice | $1_choice | `off_choice` | Off | |
| Feature string | (feature_name)_$1 | `colorpicker_hsb` | HSB | Feature strings are strings that are confined to a specific feature. Examples include the gesture and color picker. |
| Launcher string | $1_launcher | `device_contacts_launcher` | Contacts from device | Strings that are specific to the Launcher area |