Skip to content

Commit 1690230

Browse files
Inhishonornpjohnson
authored andcommitted
wiki: Add section on dealing with strings in apps
Change-Id: I917a66dfad2f235b728a23ecb6dca3739d1374cc
1 parent 2b4f7de commit 1690230

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

pages/how-tos/contributing_to_apps.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,18 @@ Eventually, when your change looks _perfect_, someone will approve and merge it.
107107

108108
## Tips
109109

110+
### Modifying strings
111+
112+
When contributing to these apps, keep in mind that modifiying strings differs from normal Android app development.
113+
114+
#### Adding strings
115+
116+
When an app is imported from AOSP to Lineage, we generally keep the strings separate by adding a string file with the name of either `cm_strings` or `lineage_strings`. This is so that we can translate them and keep track of our own strings verus upstream. When editing an app's strings check to see if the app has one of these files. If it does then **all** new strings should be added there otherwise you can simply add strings to the regular `strings.xml` file.
117+
118+
#### Editing strings
119+
120+
When editing current strings, be sure to only edit the main strings file in `values/strings`. There is no need to update, add or delete any of the translations, even if you only changed the string name. All of this is taken care of by our translation import.
121+
110122
### gradle-generatebp
111123

112124
LineageOS apps use the [gradle-generatebp](https://github.com/lineage-next/gradle-generatebp) tool. This Gradle plugin automatically generates .bp files (Android Blueprint build files) for imported libraries, allowing developers to choose which dependencies to use from AOSP and which to include as prebuilts.

0 commit comments

Comments
 (0)