Chanjung Kim
877fbcc2b0
Fallback to `other` pluralization when the right one not found
9 months ago
Chanjung Kim
7f3db17c1c
Rename properties of GeneratePluralRuleListsTask
9 months ago
Konstantin Tskhovrebov
bb419dd1e5
[resources] Add autogenerated plural rules under git tracking
9 months ago
Chanjung Kim
5df675ef35
Add pluralization condition optimization
9 months ago
Chanjung Kim
95f7314f62
Share PluralRuleList with languages with the same rule
9 months ago
Chanjung Kim
700393edf2
Rename QuantityStringResource to PluralStringResource for consistency
9 months ago
Chanjung Kim
864237e89c
Remove redundant comments
9 months ago
Chanjung Kim
b341df41e2
Add more tests for pluralization
9 months ago
Chanjung Kim
6570cd3e08
Parse without using String.split
9 months ago
Chanjung Kim
d0eea88e2b
Add unit tests for pluralization rules
9 months ago
Chanjung Kim
c2ca9488e5
Fix LDML range parsing
9 months ago
Chanjung Kim
7413a2249e
Determine PluralCategory by current environment
9 months ago
Chanjung Kim
656872aadb
Generate Kotlin arrays containing pluralization rules during build
9 months ago
Chanjung Kim
a9904faf64
Copy plurals.xml from Unicode CLDR
9 months ago
Chanjung Kim
5a3a9747ac
feat: Add QuantityStringResource and pluralStringResource
9 months ago
Konstantin
6f3eb08488
[resources] Fix readResourceBytes function on Android if font is located under qualified directory ( #4512 )
...
Fix the problem when users try to read a font bytes under a qualified
directory.
9 months ago
Konstantin
ad9c898651
[resources] Use first of preferred locales instead of a current on iOS ( #4507 )
...
There is a bug on iOS:
```
NSLocale.currentLocale() -> 'en-US'
NSLocale.preferredLanguages().first().let { NSLocale(it as String) } -> 'ru'
```
An equal result was expected!
the first method was used in a non-compose code and another one in the
compose code.
The PR fixes behavior in a non-compose environment.
9 months ago
Konstantin
e8459e19b4
[resources] Fix regionCode crash on iOS before 17 ( #4473 )
...
The regionCode API
```
NSLocale.currentLocale().regionCode
```
was published in iOS 17:
https://developer.apple.com/documentation/foundation/nslocale/4172868-regioncode?language=objc
to make it works on all iOS versions we have to use:
```
NSLocale.currentLocale().objectForKey(NSLocaleCountryCode) as? String
```
fixes https://github.com/JetBrains/compose-multiplatform/issues/4469
9 months ago
Konstantin
e7f1a6cc20
[resources] Fix regionCode crash on iOS before 17 ( #4473 )
...
The regionCode API
```
NSLocale.currentLocale().regionCode
```
was published in iOS 17:
https://developer.apple.com/documentation/foundation/nslocale/4172868-regioncode?language=objc
to make it works on all iOS versions we have to use:
```
NSLocale.currentLocale().objectForKey(NSLocaleCountryCode) as? String
```
fixes https://github.com/JetBrains/compose-multiplatform/issues/4469
9 months ago
Luca Spinazzola
4c238f5ff8
update macOS readResourceBytes to use composeResources ( #4458 )
...
Loading resources in the demo is broken without updating this to use
`composeResources`
9 months ago
Igor Demin
e14bf1c072
Resources. Don't return a cached value when pass new args ( #4333 )
...
The issue was because we cache the value in the current composition, and
the next composition returns the cached value.
There weren't an issue if we just call one `stringResource` after
another because those are different compositions.
Fixes https://github.com/JetBrains/compose-multiplatform/issues/4325
10 months ago
Igor Demin
4e948e4bc3
Resources. Don't return a cached value when pass new args.
...
The issue was because we cache the value in the current composition, and the next composition returns the cached value.
There weren't an issue if we just call one `stringResource` after another because those are different compositions.
Fixes https://github.com/JetBrains/compose-multiplatform/issues/4325
10 months ago
Konstantin Tskhovrebov
c8ef4c0412
Update compose version to "1.6.0-rc01" in components project
10 months ago
Konstantin Tskhovrebov
b83de7e569
Update compose version to "1.6.0-rc01" in components project
10 months ago
Konstantin
fbf5dbe20f
Fix fonts duplication in android app. ( #4284 )
10 months ago
Konstantin
a0601c3024
Register all hierarchical compose resources in android compilation ( #4274 )
10 months ago
Oleksandr Karpovich
c4bc761b0d
Gradle Plugin: Force kotlinx-coroutines version 1.8.0-RC2 for web targets in user projects ( #4278 )
...
Removed such the version substituion from the resources library. The
versions will be subtituted now by gradle plugin.
10 months ago
Konstantin
d6b8681b22
Don't make resource IDs lowercased ( #4253 )
10 months ago
Oleksandr Karpovich
ffea196aa8
Use coroutines 1.7.3 for desktop and native. But use 1.8.0-RC2 for web targets ( #4244 )
10 months ago
Konstantin
870b2d3aec
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.
10 months ago
Konstantin Tskhovrebov
3c7260ea51
Add a ttf font to the resources demo app
11 months ago
Konstantin
18de77e0bd
Update dependency versions and refactor build configs ( #4215 )
11 months ago
Konstantin Tskhovrebov
4a65b1a1d8
Refactor compose library tests
11 months ago
Konstantin
b4881ffe01
Fix native xml parser and add ios native tests ( #4207 )
...
Co-authored-by: Da Risk <da_risk@geekorum.com>
11 months ago
Konstantin Tskhovrebov
ee26bf8bee
Use "project.findProperty" instead of "providers.valueOrNull" to fix sub-module gradle properties for res class generation
11 months ago
Konstantin
c31c761e09
Mark all resources public API as experimental. ( #4146 )
...
And all public but only for generated code API as @InternalResourceApi
11 months ago
Konstantin
f405dd8ba0
Delete experimental marker from stable resources APIs ( #4144 )
11 months ago
Konstantin
747aab02f3
Introduce top level composeResources dir ( #4127 )
11 months ago
Konstantin
8955e66eac
Introduce a 'composeResources/files' directory for any files. ( #4079 )
...
Introduce a 'composeResources/files' directory for any files.
11 months ago
Igor Demin
6c4def5bb5
Fix Qualifier density ( #4088 )
...
```
LDPI(120), // 120/160 = 0.75
MDPI(160), // 160/160 = 1.0
HDPI(240), // 240/160 = 1.5
XHDPI(320), // 320/160 = 2.0
XXHDPI(480), // 480/160 = 3.0
XXXHDPI(640); // 640/160 = 4.0
```
11 months ago
Konstantin
8423efc466
Override non-composable function getResourceEnvironment for tests ( #4057 )
12 months ago
Konstantin
4c6bebb237
Add TestComposeEnvironment for resource tests ( #4056 )
12 months ago
Konstantin
27915cbc0f
Get environment and select resource by qualifiers ( #4018 )
12 months ago
Oleksandr Karpovich
382c6a319b
run k/wasm tests in resources library ( #4031 )
...
Co-authored-by: Oleksandr.Karpovich <oleksandr.karpovich@jetbrains.com>
1 year ago
Oleksandr Karpovich
5e999e7b7d
Add K/Wasm target to components/resources library ( #4028 )
...
Changes:
- added k/wasm target to library and demo
- added libs.versions.toml with coroutines version
Tested:
- using demo project
- publishToMavenLocal
I'll setup the test separately.
---------
Co-authored-by: Oleksandr.Karpovich <oleksandr.karpovich@jetbrains.com>
1 year ago
Konstantin
181bfd1612
Resources gradle plugin ( #3961 )
1 year ago
Konstantin
760f3f5b24
Revert "Rename components library modules. ( #3991 )"
1 year ago
Konstantin
12992dceb3
Rename components library modules. ( #3991 )
...
There was a problem with an android publication. Android artifactId has
name "module_name"-"android" even though we explicitly renamed
artifactId inside the configureMavenPublication block. It means that
"components-ui-tooling-preview" android library rewrites
"components-resources" android library on the maven. Because they have
the same name "library-android".
1 year ago
Konstantin
5cc685c1dc
Use regular icons instead of extended to fix build
1 year ago
Konstantin
7505624aa0
Use separate cache dispatchers with limited parallelism ( #3929 )
1 year ago