-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve handling of special characters in string resources (#4220)
Introduced a function to process and replace certain escaped symbols like '\n', '\t', and '\uXXXX' in the strings extracted from compose string resources.
- Loading branch information
Showing
3 changed files
with
49 additions
and
11 deletions.
There are no files selected for viewing
13 changes: 6 additions & 7 deletions
13
components/resources/demo/shared/src/commonMain/composeResources/values/strings.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
<resources> | ||
<string name="app_name">Compose Resources App</string> | ||
<string name="hello">😊 Hello world!</string> | ||
<string name="multi_line">Lorem ipsum dolor sit amet, | ||
consectetur adipiscing elit. | ||
Donec eget turpis ac sem ultricies consequat.</string> | ||
<string name="str_template">Hello, %1$s! You have %2$d new messages.</string> | ||
<string name="multi_line">Lorem ipsum dolor sit amet,\nconsectetur adipiscing elit. | ||
Donec eget turpis ac sem ultricies consequat.</string> | ||
<string name="str_template">Hello, %1$s!\nYou have %2$d new messages.</string> | ||
<string-array name="str_arr"> | ||
<item>item 1</item> | ||
<item>item 2</item> | ||
<item>item 3</item> | ||
<item>item \u2605</item> | ||
<item>item \u2318</item> | ||
<item>item \u00BD</item> | ||
</string-array> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters