feat(TextBase): localized text transform#11302
Merged
NathanWalker merged 6 commits intoJul 16, 2026
Merged
Conversation
|
View your CI Pipeline Execution ↗ for commit 3c8e2fa
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Pull request overview
Adds locale-aware casing for CSS text-transform in TextBase, using platform-native localized casing APIs (iOS) and Java-side casing/capitalization helpers (Android) to improve correctness for non-English locales.
Changes:
- iOS: switch
uppercase/lowercase/capitalizetolocalizedUppercaseString,localizedLowercaseString, andlocalizedCapitalizedString. - Android: route transformations through
org.nativescript.widgets.Utilsand introduce a shared Java capitalization implementation. - Update Android type definitions to expose the new
Utilsstring APIs; lockfile updated accordingly.
Reviewed changes
Copilot reviewed 3 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ui-mobile-base/android/widgets/src/main/java/org/nativescript/widgets/Utils.java | Adds Java-side string transform helpers used by TextBase, including a new capitalizeString implementation. |
| packages/types-android/src/lib/android/org.nativescript.widgets.d.ts | Exposes the new Utils string transform helpers to TypeScript/JS. |
| packages/core/ui/text-base/index.ios.ts | Uses localized NSString casing APIs to respect current locale for text transforms. |
| packages/core/ui/text-base/index.android.ts | Switches text transforms to call into Java Utils helpers (instead of JS casing). |
| package-lock.json | Updates lockfile entries (dependency tree reshaping). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+580
to
582
| // Use the java string methods to get localized transformations. | ||
| // This will respect the locale set by native apis or the localize plugins. | ||
| switch (textTransform) { |
CatchABus
force-pushed
the
fix/localized-text-transform
branch
from
July 16, 2026 00:13
3c8e2fa to
91ea568
Compare
NathanWalker
approved these changes
Jul 16, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
What is the current behavior?
Right now, CSS
text-transformproperty does not respect locale.This results in incorrect text casing for languages other than English.
What is the new behavior?
CSS
text-transformproperty will respect current locale (can be changed using native apis).This PR also contains a new and accurate capitalization function to ensure
capitalizeis identical in both platforms (inspired by Apache WordUtils.capitalize).Users can also use
@nativescript/localizeor@nativescript-community/lplugins to switch locale to one of their own andtext-transformwill respect that.For
@nativescript/localize, useoverrideLocaleandandroidLaunchEventLocalizationHandlerfunctions.For
@nativescript-community/l, useoverrideNativeLocalefunction.