crowdin / flutter-sdk Goto Github PK
View Code? Open in Web Editor NEWCrowdin Flutter SDK for instant translation delivery Over-The-Air directly to your application
Home Page: https://pub.dev/packages/crowdin_sdk
License: MIT License
Crowdin Flutter SDK for instant translation delivery Over-The-Air directly to your application
Home Page: https://pub.dev/packages/crowdin_sdk
License: MIT License
Currently, this method returns null
if an exception occurs during the translation download.
It would be great to provide a way for a developer to access the exception details. This will improve the DX and allow to better handle these exceptions.
Code: loadTranslations(...)
The https://pub.dev/packages/uni_links package is almost deprecated - the last update was published 2 years ago. Since it is a transitive dependency in the crowdin-sdk, it causes some issues. E.g. for Android, apps cannot be migrated to Gradle 8.4. Are there any plans to remove this package and replace it with an alternative?
Describe the bug
For instance, take the following localization: {rating} ({reviews, plural, =1{1 review} other{{reviews} reviews}})
. CrowdinSDK returns this as only {reviews, plural, =1{1 review} other{{reviews} reviews}}
.
Examples (how {rating} ({reviews, plural, =1{1 review} other{{reviews} reviews}})
is formatted):
Values | Expected | Actual |
---|---|---|
rating: "4.8", reviews: 50 | 4.8 (50 reviews) | 50 reviews |
rating: "3.5", reviews: 1 | 3.5 (1 review) | 1 review |
To Reproduce
rating
value as "4.8" and the reviews
value as 48..."profileRating": "{rating} ({reviews, plural, =1{1 review} other{{reviews} reviews}})",
"@profileRating": {
"description": "Profile rating + number of reviews.",
"placeholders": {
"rating": {
"type": "String",
"example": "4.8"
},
"reviews": {
"type": "int",
"example": "48",
"format": "compact"
}
}
},
rating
and reviews
variables.{rating} ({reviews, plural, =1{1 review} other{{reviews} reviews}})
Environment
Additional context
I don't think any additional info is needed, but let me know if you want something to be clarified.
Currently, this class has low coverage by Unit tests - Codecov report
Class - crowdin.dart
Tests examples - https://github.com/crowdin/flutter-sdk/tree/main/test
Describe the bug
When using the Flutter ARB file format for translations together with the CDN 'select' translations will not work for the translated languages. They are correctly displayed and formatted in Crowdin itself and work when exporting bundles, but not with the CDN.
To Reproduce
Steps to reproduce the behavior:
"roamingChoice": "{choice, select, month{For 1 month} unlimited{Unlimited} deactivate{Deactivate} other {}}",
"@roamingChoice": {
"placeholders": {
"choice": {
"type": "String"
}
}
}
Expected behavior
Load in the translation select not as a static String.
Environment
Smartphone (please complete the following information):
Currently, this class is not covered by tests - Codecov report
Class - crowdin_storage.dart
Tests examples - https://github.com/crowdin/flutter-sdk/tree/main/test
Hi and thanks for the Flutter SDK,
I have an issue with it, knowing that I'm not using the real-time feature.
So basically, it's a call to https://distributions.crowdin.net/{distribution_hash}/content/{path_to_file}
.
However, even if my distribution is updated, I still receive the old one.
If instead, I call https://distributions.crowdin.net/{distribution_hash}/content/{path_to_file}?timestamp={timestamp_from_manifest}
, it's now OK.
Is-it an API issue or is there a specific reason you don't use the timestamp
parameter?
Method:
flutter-sdk/lib/src/crowdin_api.dart
Line 61 in f45930a
Place in code:
Config:
If the developer sets the OrganizationName
in the config, we should also pass it to the getMetadata
method to properly resolve the metadata endpoint.
Currently, the SDK requires the [project
, tm
] scopes for authorization (code).
These scopes provide too much access and are redundant. We need to check which API method the SDK is really using and only need a minimal amount of scopes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.