- Add
--help
flag to the generator to show help. - Fix
LanguageConditions
TYPO in README.
- Add
const
to theLanguageConditions
. - Remove the
language_helper
library.
- Improve README for ios locales configuration.
- Improve the way to print the debug log.
- Support the web platform (only improve the list on pub.dev).
- Support a wider range of dependency versions.
- Bump
language_helper_generator
to0.5.1
:- Change the generated path in Map from
'@path_1': '.lib/to/file.dart'
to"@path_.lib/to/file.dart": ''
- Change the generated path in Map from
- Bump dependencies.
- Release to stable.
- Add
trC
to translate with the custom instance of LanguageHelper. - The default instance is now set to final to avoid modifying.
- Improve Tr builder.
- Update example and tests.
- Bump
language_helper_generator
to supporttrC
.
- Able to use the custom
LanguageHelper
inLanguageBuilder
andTr
.
- Add topics.
- Add
isInitialized
(bool) andensureInitialized
(Future) to check whether theinitial
is run. - Update tests.
- Improve README.
- Improve example.
-
Improve the logic of using the temporary data while developing.
- Right:
languageHelper.initial( data: [] );
- Wrong:
languageHelper.initial( data: [LanguageDataProvider.data({})], );
-
assets
data is preferred betweenassets
andnetwork
because we still haven't a way to cache it.
-
The
language_helper
in.asset
and.network
ofLanguageDataProvider
are now required. So we don't need to add it into the input path:- Before:
LanguageDataProvider.asset('assets/resources/language_helper'); LanguageDataProvider.network('https://example.com/resources/language_helper');
- Now:
LanguageDataProvider.asset('assets/resources'); LanguageDataProvider.network('https://example.com/resources');
-
Generator:
-
Change the default path of the Dart Map generator:
- Before:
|-- .lib | |--- resources | | |--- language_helper | | | |--- _language_data_abstract.g.dart ; This file will be overwritten when generating | | | |--- language_data.dart
- Now:
|-- .lib | |--- resources | | |--- language_helper | | | |--- language_data.dart | | | |--- languages | | | | |--- _generated.dart ; This will be overwritten when re-generating
-
Change the default path of the Dart Map generator:
- Before:
|-- assets | |--- language_helper | | |--- codes.json ; List of supported language code | | |--- languages | | | |--- _generated.json ; Each language will be stored in 1 files
- Now:
|-- assets | |--- resources | | |--- language_helper | | | |--- codes.json | | | |--- languages | | | | |--- _generated.json ; This file will be overwritten when re-generating
-
JSON generator will not overwrite the
codes.json
when re-generating.
-
- Bump min sdk to
3.0.0
. - Able to create a new
LanguageHelper
instance. - Change from
LanguageData
toLanguageDataProvider
to support the data fromdata
(the defaultLanguageData
),asset
(JSON from the local assets) andnetwork
(JSON from the URL). - Multiple
LanguageDataProvider
inputs are supported. - Able export JSONs from the current
LanguageData
(for the migration). - Remove deprecated features.
- Improve README.
- Promote to stable.
- This release includes the BREAKING CHANGE.
- Improve the
forceRebuild
logic.
- Improve the
LanguageBuilder
behavior to avoid the dupplicated state issue.
- Bump
language_code
to 0.4.0 to support country code.- BREAKING CHANGE NOTE: The method
.fromEnglishName
and.fromNativeName
may be broken in this version with this Changelog.
- BREAKING CHANGE NOTE: The method
- Add an instruction for the
Language Helper Translator
with custom Chat GPT-4 in README. - Add
isOptionalCountryCode
paramenter to theinitial
method to control the country code behavior. - Deprecates
LanguageHelper.instance.delegate
->LanguageHelper.instance.delegates
. - Add tests.
- Improve README.
- Improve the pub score.
- Update language_helper_generator to
0.4.1
:- Completely rewritten using dart analyzer to improve reliability.
- Improve README.
- Update language_helper_generator to
0.3.0
:- Convert to single quote when possible to avoid duplicated text issue.
- Able to parse a text with
r
raw text tag.
- Improve README.
- Beside using 'default' in
LanguageCondition
to set the default value, we can use '_' from this version.
- Update homepage URL.
- Bump dependencies.
- Update codecov URL.
- Add
syncWithDevice
parameter to sync the language with the device language, auto apply on changed. - The
initialCode
will keeps its value correctly. In the past version, theinitialCode
maybe changed to the local code (from SharedPreferences). - The
useInitialCodeWhenUnavailable
now works correcly. - Add more test cases.
- Automatically run
dart format
for the generated files when runningdart run language_helper:generate
.
- Add the flutter default localizations and how to use it.
- Increase code coverage to 100.
- Fix the error when adding the new language data to the unmodifiable Map.
- Support adding the new language data outside the
initial
.
- Support changing the generating path when using the generator.
- Bump dependencies
-
Add
codesBoth
toLanguageHelper
in order to get theLanguageCodes
s from bothdata
anddataOverrides
(No duplicated). -
Update dependencies.
-
language_helper_generator
:- Improve the commented text.
- Improve TODO text.
- Add
dataOverrides
toinitial
to help you override some translations that are already available in thedata
.
- Update dependencies.
- Update README.
- Update dependencies.
- Improve formatting of the analysis results.
- Remove deprecated methods.
- Update
language_helper_generator
to0.1.1
.
- Bump min sdk to 2.18.0.
- Bump flutter version to 3.3.0.
- Update dependencies.
- Improve test coverage (reach 99.1%).
- Set the sdk version:
">=2.17.0 <4.0.0"
- Bring the release candidate to stable.
- Fixes issues of the
LanguageData
serializer. - Improves test coverage.
- Add
LanguageConditions
to be able to use the plural translation inLanguageData
. - Add serialization for
LanguageData
:- Use
data.toJson()
to convert the data to JSON. - Use
LanguageDataSerializer.fromJson(json)
to convert the JSON data back to theLanguageData
.
- Use
- Update command to
dart run language_helper:generate
. - Update test for
LanguageConditions
andLanguageDataSerializer
. - Update README.
- Mark
Lhb
as deprecated, useTr
instead. - Improve README.
- Add more details to README.
- Add
language_helper_generator
as a build-in function. Using by commandflutter pub run language_helper:generate
.
- Bring the release candidate to stable.
- Change from
currentCode
tocode
, addlocale
to get the current Locale. - Add
locales
to get the current list of language as Locale. - The
data
is now asserted as must be not empty. initial()
must be run before callingcode
orlocale
, socode
andlocale
are non-null.- Add
Lhb
as a short version ofLanguageBuilder
. trP
andtrT
's parameter are now required.- Add more tests.
- Update example.
stream
now will works even when theonChanged
is not set.
- Add
stream
to LanguageHelper, you can listen for language change events.
- Supports early state of language_helper_generator.
- Improves
onChanged
return type. - Add
analysisKeys
parameter toinitial
(mostly used forlanguage_helper_generator
I think). - Improves description for the result of
analyze
method. - Update README.
- Improve pub scores.
- Add
.trT
extension to use onlytoCode
parameter. - Refactor internal code.
- Add
LanguageCodes.fromName
andLanguageCodes.fromNativeName
. - Add
orElse
parameter toLanguageCodes.fromCode
,.fromName
and.fromNativeName
.
- Add
toCode
parameter totranslate
method to translate the current text to a specific code instead of the currentCode. - Add
.trF
extension to use full version oftranslate
. - Update README.
- Renamed from
LanguageNotifier
toLanguageBuilder
and marked it as Deprecated. - Improved
LanguageBuilder
behavior.
- Use the
language_code
plugin instead of thedevicelocale
.
- Added
isAutoSave
parameter toinitial
to allow the plugin auto save and reload the language when changed and opened in the next time.
- You can use
@{param}
instead of@param
to translate text with parameters. - Added
params
parateters to thetranslate
method.
-
[BREAKING CHANGE] the
initial
method will returnFuture
, so you need to useawait
to make it equal to before. -
The app will try use
Devicelocale
as the default language code if theinitialCode
is not set. -
Added
useInitialCodeWhenUnavailable
parameter to control theLanguageCodes
when you change to unavailable code. -
Added
trP()
extension to allow replacing specific texts by values. Ex:final text = 'Hello @user'.trP({'user' : 'Vursin'}); // => Hello Vursin
-
Added test.
- Improved the pub score.
- Improved function headers.
- Changed to use
debugPrint
.
- [BREAK] Rename the param from
defaultCode
toinitialCode
. - [FEAT] Add a param
onChanged
to notify when the language is changed.
analyze
will be automatically called ininitial
whenisDebug
istrue
.
- [LanguageHelper] add
forceRebuild
to allow the plugin to force rebuild all the widgets intead of only root widgets. - [LanguageNotifier] add
forceRebuild
to allow the plugin to force rebuild this specific widget or not.
- [Feat] Add method
LanguageHelper.instance.analyze()
to analyze the missing texts of all languages. - Add headers for
LanguageCodes
enum.
- [LanguageNotifier] Only change the state of the root widgets to improve performance.
- Initial release.