-
Update affects the Sqlite data provider:
-
Dropped the non-component based schema to simply data repository management. Affected
.sqlite3
databases were migrated to the component based schema, where the filename is used to populate thecomponent
column entries. -
Added schema verification function.
-
Minor documentation formatting.
-
-
Added
#![allow(unexpected_cfgs)]
to files containing optional feature options, to eliminate warnings from being emitted. -
Migrated the
.sqlite3
databases in the crate’s subdirectoryl10n
to the component based schema.
-
In
error.rs
:-
Added new error variants that are used in the
verify_schema()
function.
-
-
In
provider.rs
:-
New public function
verify_schema()
. Reason for public is to allow the localisation editor to verify the database structure before editing of the contents. In addition, the schema version is returned, so that the provider and localisation editor can take appropriate actions, such as adjusting query statements, migrating from older version to newer version, etc. -
Added internal enum
DefaultValue
added, to pass the expected default value of a column. -
Added internal functions
table_exists()
andcolumns_check()
.
-
Warning
|
This update has API breaking changes. |
-
Primary focus of this version was eliminating of
String
duplications, particular from the internal cache. -
Changed the string returned type from
TaggedString
to a tuple(RefCount<String>, RefCount<LanguageTag>)
, whereRefCount
is eitherRc
orArc
. This change allows the user of this library to discard the language tag with ease, without expensive copying of theString
. HoweverTaggedString
will still remains in thei18n_utility
crate, for those who still want the convenience of keeping string tagged with language. -
Added to
LanguageTag
struct a method for creating an ICULanguageIdentifier
orLocale
(with featureicu_extended
) instance. -
On the
LanguageTagRegistry
, made the caching ofLanguageIdentifier
orLocale
instances optional by providing a dedicated methodicu_language
that will return a cached reference counted instance. If not already present in the cache, the method will create and add the instance immediately to the cache, then return the reference counted instance.
-
Altered the affected unit tests for the changes made.
-
Updated examples and documentation to reflect the changes made to structs, enums and methods.
-
Updated
Cargo.toml
to latest dependencies versions.
-
In
error.rs
:-
Added new variant
NeverReached
to theLocaliserError
enum.
-
-
In
formatter.rs
:-
Implemented new variant
Localised
inPlaceholderValue
match statements. -
Other minor editing.
-
-
In
localiser.rs
:-
Changed the
TaggedString
to(String, RefCount<LanguageTag>)
for methods:format()
,format_with_defaults()
,literal()
,literal_with_defaults()
,format_localisation_data()
,format_localisation_data_with_defaults()
,format_error()
,format_error_with_defaults()
, and internal methods. -
Implemented new variant
Localised
inPlaceholderValue
match statements.
-
-
In
provider.rs
:-
Changed the
TaggedString
to(String, RefCount<LanguageTag>)
for methods:string()
,string_exact_match()
, andstrings()
.
-
-
In
provider.rs
:-
Changed the
TaggedString
to(String, RefCount<LanguageTag>)
for methods:string()
,string_exact_match()
,strings()
, and all internal methods.
-
-
In
language.rs
:-
Added new method
ice_language()
to theLanguageTag
type. -
For the
LanguageTagRegistry
:-
changed the caching of
LanguageIdentifier
orLocale
instances to be optional, that is no longer createsLanguageIdentifier
orLocale
instance and add to the cache when validating the supplied language tag. -
changed
tag()
method to only validate the supplied language tag without creatingLanguageIdentifier
orLocale
instances. -
removed methods:
locale()
andtag_and_locale()
as cache is made optional. -
added
icu_language()
method to obtain cachedLanguageIdentifier
orLocale
instance for the suppliedLanguageTag
.
-
-
-
In
tagged_string
:-
Added new method
as_string()
to return a reference&String
.
-
-
In
types.rs
:-
Added new variant
Localised(RefCount<String>, RefCount<LanguageTag>)
to thePlaceholderValue
enum.
-
-
Added script directional support.
-
Added
icu_locid_transform
dependency to variousCargo.toml
-
Added new feature
icu_extended
for expanded support. Provides additional scripts data, that is currently not available inicu_locid_transform
.
-
Added
scripts.rs
containing script direction data provider for theicu_extended
feature, and added entry inlib.rs
. -
In
localiser.rs
added script direction support to the localiser, and added new public methodsscript_data()
andscript_data_for_language_tag()
.
-
Fixed logging of debugging information
-
Fixed project’s root
README.asciidoc
.
-
Changed debug information statements from
println!()
totrace!()
. -
Changed
[cfg(feature = "log")]
to[cfg(feature = "logging")]
in source files of crates havinglogging
feature. -
Fixed logging statements, that was not processed during compiling with the feature
logging
due to incorrect#[cfg(feature = "log")]
statements.
Warning
|
This update has API breaking changes, Cargo feature changes, crates merging. |
-
Updated the description in the project’s
README.asciidoc
. -
Source code clean up with the aid of
cargo clippy
andcargo fmt
. -
Streamlined the process of setting up the i18n environment.
-
Merged crate
i18n_icu
intoi18n_lexer
, and cratei18n_pattern
intoi18n_localiser
. -
Added experimental directory for prototyping and development of sub projects.
-
Added new subproject i18n_renderer for rendering text for various script types. Still in early stage.
-
-
Cargo features changes:
-
Added
icu_extended
to make use of more detailed information ICU types, such asLocale
instead ofLanguageIdentifier
. -
Renamed
blob
toicu_blob
,compiled_data
toicu_compiled_data
,fs
toicu_fs
,log
tologging
.
-
-
Changed various functions and methods to use explicit
&str
instead of traitAsRef<str>
, to avoid issues with passingAsRef<str>
in internal called functions and methods. -
Where required updated the
Cargo.toml
,README.asciidoc
, tests, examples and documentation.
-
Merged
i18n_icu
crate intoi18n_lexer
crate. -
Removed the directory
crates/icu
after merging.
-
Rewrote
Lexer
into an owned iteratorLexerIterator
. -
Added new
LexerError
type toerror.rs
. -
Renamed localisation repository from
i18n_icu.sqlite3
toi18n_lexer.sqlite3
and added entries forLexerError
.
-
Streamlined the i18n environment:
-
Made the
formatter.rs
to be private as theFormatter
instances are created by theLocaliser
methods, -
The creation of the
Tree
instance and the lexer are now embedded in the `Formatter::try_new()', -
Made the
parser.rs
to be private due to theTree
creation is embedded inFormatter::try_new()
, -
Made the
LexerIterator
to be called fromFormatter::try_new()
, -
As a result of streamlining the environment, the embedded
Tree
never gets a chance to be modified, thus a new custom stripped down optimised tree was created. As the tree being internal immutable, many sanity checks was removed and other unused methods was removed. The newtree.rs
made to be private. Embedded theLexerIterator
and the parser source code within theTree:try_new()
.
-
-
Modified various methods to use the new
Tree
. -
Removed the crate dependency
tree-rizzen-yazston
. -
Removed
parser.rs
. -
Changed
AsRef<str>
to&str
of various methods of various structs of the crate’s modules. -
Merged the
i18n_pattern.sqlite3
intoi18n_localiser.sqlite3
, and added entries for the newTreeError
. -
Various files, changed language tag parameters to use
LanguageTag
struct instead.
-
Merged
i18n_pattern
crate intoi18n_localiser
crate. -
Removed the directory
crates/pattern
after merging.
-
Fixed log messages.
-
Changed
AsRef<str>
to&str
of internal methods. -
Various files, changed language tag parameters to use
LanguageTag
struct instead.
-
Modified
registry.rs
:-
Renamed
registry.rs
tolanguage.rs
. -
Added
LanguageTag
struct to hold the result language tag. -
Altered
LanguageTagRegistry
struct and methods to useLanguageTag
.
-
-
Modified
tagged_string.rs
to use newLanguageTag
instead ofString
.
Warning
|
This update has moved some enums, structs, and traits to other crates. Check the use paths in rust files of projects depending on individual crates of the i18n project.
|
-
Add support for recursive localisation strings. To achieve this goal, needed to move various files, data structures, and traits between the various crates.
-
Updated various
error.rs
files to reflect the changes to thetraits.rs
file ini18n_utility
crate. -
Updated localisation Sqlite3 databases of various crates.
-
Updated
Cargo.toml
, documentation, examples and tests where necessary to reflect the changes done within the project.
-
In
Cargo.toml
added feature dependencies due toFormatter
being moved from thei18n_pattern
crate to thei18n_localiser
crate in order to avoid cyclic crate dependencies.
-
Corrected identifier strings for
IcuError
. -
Added
Clone
attribute toDataProvider
andIcuError
enums. -
Implemented the new traits of
i18n_utility
crate forIcuError
enum.
-
Moved
formatter.rs
fromi18n_pattern
crate toi18n_localiser
crate. -
Moved
FormatterError
fromi18n_pattern
crate toi18n_localiser
crate. -
Moved localisation strings for
Formatter
fromi18n_pattern
crate toi18n_localiser
crate. -
Added
Clone
attribute toLocaliserError
andFormatterError
enums. -
Implemented the new traits of
i18n_utility
crate forLocaliserError
andFormatterError
enums. -
Add two new methods using
LocalisationData
instead of&str
type forcomponent
andidentifier
parameters:format_localisation_data()
andformat_localisation_data_with_defaults()
. -
Added two new convenient methods:
format_error()
andformat_error_with_defaults()
.
-
Moved
formatter.rs
toi18n_localiser
crate. -
Moved
FormatterError
toi18n_localiser
crate. -
Moved localisation strings for
Formatter
toi18n_localiser
crate. -
Moved
PlaceholderValue
toi18n_utility
crate’stypes.rs
. -
Added
Clone
attribute toParserError
andCommandError
enums. -
Implemented the new traits of
i18n_utility
crate forParserError
andCommandError
enums.
-
Added
Debug
toComponentDetails
,LanguageData
, andRepositoryDetails
. -
Changed trait
LocalisationProvider
toLocalisationProviderTrait
to be more clear. -
Added new
ProviderError
enum to separate common errors, that are not Sqlite based. -
Change method signatures to allow trait to be object safe, removing the generic
<T: AsRef<str>>
, and replacingT
with&str
. -
Implemented the new traits of
i18n_utility
crate forProviderError
enum. -
Add localisation directory
l10n
to contain the common localisation strings separated from the Sqlite based localisation string. -
TODO (just noted here): Improve error message for variant
InvalidDefaultLanguage
.
-
Added
Clone
attribute toProviderSqlite3Error
enum. -
Added new
SchemaError
to improve error reporting of schema issues. -
Implemented the new traits of
i18n_utility
crate forProviderSqlite3Error
andSchemaError
enums. -
Altered various implementations of the
LocalisationProviderTrait
to be object safe. -
Improved
default_language()
method along with database improvements.
-
Modified
traits.rs
:-
Changed
LocalisationErrorTrait
to a simple super trait combiningLocalisationTrait
andError
traits. Removed the methodserror_type()
anderror_variant()
. -
Changed
LocalisationTrait
removingidentifier
andcomponent
methods, and addinglocalisation_data()
method.
-
-
Created file
types.rs
:-
Created new
LocalisationData
struct, which supports recursive localisation strings and also supports literal localisation strings by usingNone
for thevalues
field, -
Moved
PlaceholderValue
enum fromi18n_pattern
crate’stypes.rs
.
-
-
Implemented the new traits of
i18n_utility
crate forRegistryError
enum. -
Moved the localisation strings to
i18n_localiser
crate, and removed the directoryl10n
.
Warning
|
This update has API breaking changes for almost all i18n crates.
|
-
Redesigned
IcuDataProvider
to make use of new internal data feature inicu
1.3.0, and to resolve issue related to genericDataProvider
issue with applications'main()
method. -
Added support for rust’s concurrency to the
i18n_
crates, by usingArc
andMutex
insteadRc
andRefCell
when enabling the crate featuresync
. Where necessary also passessync
also to the ICU4X crates, that this project depends on. -
Changed
LString
toTaggedString
considering it is a string being tagged to some identifier, and is generic in design to be used outside of the project, where tagged strings are required. -
Redesigned of
LStringProvider
for clearer usage including name changed toLocalisationProviderTrait
, and added information methods for the data repository.LStringProviderSqlite3
updated to implement the changes, including name changed toLocalisationProviderSqlite3
, and implement new required methods. There may be additional methods in the future. -
Added log support to various crates.
-
Added two traits for aiding in localising structs and enums. Implemented for the error types of the
i18n
crates. -
Next version: See what new ICU4X features is available to add to
pattern.rs
.
-
Moved many shared package attributes from the various crates'
Cargo.toml
to workspace’sCargo.toml
for easier management of project details. -
Moved all project dependency details to workspace’s
Cargo.toml
for easier management of project dependencies. -
Implemented localisation traits for the error type(s) of the various crates.
-
Adjusted
Cargo.toml
, tests, and documentation to reflect the changes.
-
Added new enum
DataProvider
to specify the supported data provider to use. -
Reworked
IcuDataProvider
to use newDataProvider
. Also included sanity check to ensure that there is a data provider. -
Added Sqlite3 file for supported error language strings.
-
Added logging.
-
Changed
Lexer
struct to be public, movedtokenise()
function to be method ofLexer
, and created new methodnew()
to initialise the lexer, by moving 2 parameters fromtokenise() to new()
.
-
Changed
Formatter::format()
to use the newIcuDataProvider
. -
For
CommandRegistry
renamedget()
tocommand()
. -
Added 5 new helper functions to obtain the required ICU formatter instance. Allows for easier support for new data providers.
-
Updated
.sqlite3
: add missing language strings forNeverReach
error, and languages strings for new errorNoIcuProvider
(separated fromNeverReach
error) for easier error distinction.
-
Renamed directory
message
tolocaliser
. -
Renamed
message.rs
tolocaliser.rs
. -
Changed
Message
to use newIcuDataProvider
and newLexer
. -
Added a default language field to
Message
and parameter fornew()
. -
Added new method for setting the defaults.
-
Added 3 new methods to obtain language strings:
format_with_defaults
,get
, andget_with_defaults
, and change the type oflanguage_tag
parameter offormat
toAsRef<&str>
. -
Added 3 new methods to get the shareable i18n components:
language_tag_registry
,command_registry
, andicu_data_provider
. -
Moved contributors information into
i18n_message.sqlite3
from.asciidoc
file for easier combining ofi18n
translation directories.
-
Renamed
LStringProvider
toLocalisationProviderTrait
. -
Updated existing methods signatures, split the
identifier
parameter into thecomponent
andidentifier
parameters. -
Renamed
get()
tostrings()
. -
Renamed
get_one()
tostring()
. -
Added new method signatures to retrieve information on the data repository:
-
string_exact_match()
, -
identifier_details()
, -
component_details()
, -
repository_details()
.
-
-
Removed redundant struct and trait.
-
Almost complete rewrite of
provider.rs
, smaller code size and performance improvement with caching of information data. -
Renamed
LStringProviderSqlite3
toLocalisationProviderSqlite3
. -
Added implementations of the new methods to retrieve information on the data repository.
-
Added caching to information methods.
-
Moved contributors information into
i18n_provider_sqlite3.sqlite3
from.asciidoc
file for easier combining ofl10n
translation directories. -
Added templates
all_in_one.sqlite3
andapplication.sqlite3
tol10n
, and unit tests still pass, indicating search progressing fromall_in_one.sqlite3
to respective component Sqlite file. -
Updated unit tests for changed methods, and adding new unit tests for information methods.
-
Removed redundant struct and trait.
-
Added
traits.rs
containing two localisation traits:LocalisationTrait
andErrorReflectionTrait
(additional methods for localising of errors). -
tagged_string.rs
:-
Renamed
lstring.rs
totagged_string.rs
. -
Renamed
LString
toTaggedString
. -
Renamed
language_tag()
totag()
. -
Implemented
Display
trait onTaggedString
to obtainto_string()
method, to create a string stripped of the tag.
-
-
registry.rs
:-
Changed method
get_language_tag
ofLanguageTagRegistry
totag
. -
Changed method
get_locale
ofLanguageTagRegistry
tolocale
. -
Changed method
get
ofLanguageTagRegistry
totag_and_locale
.
-
-
bumped icu_provider to 1.3.2
-
bumped icu_provider_fs to 1.3.2
-
bumped icu_provider_blob to 1.3.2
-
bumped icu_properties to 1.3.2
-
bumped icu_locid to 1.3.2
-
bumped icu_plurals to 1.3.2
-
bumped icu_decimal to 1.3.2
-
bumped icu_calendar to 1.3.2
-
bumped icu_datetime to 1.3.2
-
bumped icu_segmenter to 1.3.2
-
bumped fixed_decimal to 0.5.4
-
bumped rusqlite to 0.29.0
-
added log 0.4.20
-
Enabling publishing for all crates.
-
Fixed various links in the documentation, that was reported by rustdoc tool.
Warning
|
This update has API breaking changes for some i18n crates.
|
Breaking change is the result of changing how ICU data providers are used and passed to various components, thus many examples are affected even if the module is not affected by the ICU data provider change.
-
Updated various
Cargo.toml
files:-
Bumped rust-version to "1.70.0".
-
Bumped all ICU4X crates version to "1.2.0".
-
Bumped rusqlite crate version to "1.29.0".
-
-
Added the
icu
crate:-
Added
IcuDataProvider
,DataProviderWrapper
, andIcuError
. -
Added the
Cargo.toml
, license, and documentation.
-
-
Updated the
i18n_provider
crate:-
Added
LStringProviderWrapper
. -
Updated documentation.
-
-
Updated the
i18n_provider_sqlite
crate:-
Added
LStringProviderSqlite3
,AsLStringProviderSqlite3
, and its blanket implementation. -
Removed the requirement of
RefCell
forlanguage_tag_registry
parameter and struct, as it was redundant. -
Updated tests, examples and documentation.
-
-
Updated the
i18n_lexer
crate:-
Made
Lexer
struct private, made bothtokenise()
andadd_previous_characters()
methods as normal functions, removedtry_new
method and added&Rc<IcuDataProvider>
totokenise()
function parameters. -
Re-enabled the string segmenter function, as the issue in icu_segmenter 0.8.0 was fixed in icu_segmenter 1.2.0, allowing proper counting of graphemes in a string slice.
-
Removed the
error.rs
as neither of the functions returns errors. -
Updated the
lib.rs
to removeerror
module. -
Updated
Cargo.toml
, tests, examples and documentation.
-
-
Updated the
i18n_pattern
crate:-
Updated
Formatter
to useIcuDataProvider
. -
Added
CommandRegistry
andCommandError
for the command patterns. -
Added command callback function
file_path
. -
Updated
Cargo.toml
, tests, examples and documentation.
-
-
Updated
i18n_lstring
crate to merge withi18n_registry
crate:-
Added
Clone
to#[Derive()]
to allow cloning. -
Renamed
lib.rs
to 'lstring.rs', and moved toi18n_registry
crate. -
Removed
i18n_lstring
crate
-
-
Added the
i18n_message
crate:-
Added
Message
,MessageError
. -
Added tests.
-
Added the
Cargo.toml
, license, and documentation.
-
-
Updated
i18n_registry
crate:-
Renamed crate to
i18n_utility
-
Added
lstring
entries inlib.rs
-
Updated
Cargo.toml
, tests, examples and documentation.
-
Warning
|
This update has many API breaking changes for all existing i18n crates.
|
Breaking change is the result of changing the implementation of handling error after reading Andrew Gallant’s blog post 14 May 2015.
-
Added the
i18n_provider
crate:-
Added
LStringProvider
,ProviderError
. -
Added the
Cargo.toml
, license, and documentation.
-
-
Added the
i18n_provider_sqlite3
crate:-
Added implementation of
LStringProvider
using Sqlite3 backend. -
Added
tests
directory. -
Added Sqlite3 file for supported error language strings.
-
Added the
Cargo.toml
, license, and documentation.
-
-
Updated the
i18n_utility
crate:-
Renamed crate
i18n_utility
toi18n_registry
. -
Renamed
locale.rs
toregistry.rs
, and updated to useRegistryError
for error. -
Added
error.rs
file containingRegistryError
enum. -
Updated
lib.rs
to includeerror.rs
file. -
Updated
Cargo.toml
and documentation.
-
-
Updated the
i18n_lstring
crate:-
Minor documentation corrections, and made unit test independent of
icu_locid
crate, though left example usingicu_locid
crate.
-
-
Updated the
i18n_lexer
crate:-
Renamed
lib.rs
tolexer.rs
:-
Updated to use
LexerError
for error. -
Moved the test
tokenise
to its own filetokenise.rs
intests
directory.
-
-
Added
error.rs
file containingLexerError
enum. -
Added new
lib.rs
to include bothlexer.rs
anderror.rs
. -
Updated
Cargo.toml
and documentation. -
Added Sqlite3 file for supported error language strings.
-
-
Added
i18n_provider
crate:-
Added
provider.rs
file containingLStringProvider
trait. -
Added
error.rs
file containingProviderError
struct. -
Added
lib.rs
to include bothprovider.rs
anderror.rs
. -
Updated
Cargo.toml
and documentation.
-
-
Added
i18n_provider_sqlite3
crate:-
Added
provider.rs
file containingProviderSqlite3
struct implementingLStringProvider
trait. -
Added
error.rs
file containingSqlite3Error
struct. -
Added
lib.rs
to include bothprovider.rs
anderror.rs
. -
Updated
Cargo.toml
and documentation.
-
-
Updated
i18n_pattern
crate:-
Updated
Cargo.toml
and documentation. -
Updated
parser.rs
,formatter.rs
, andtypes.rs
:-
Updated to use
ParserError
andFormatterError
for the errors. -
Moved all tests to their own files
parser.rs
andformatter.rs
intests
directory.
-
-
Added
error.rs
file containingParserError
andFormatterError
enums. -
Updated
lib.rs
to includeerror.rs
file. -
Updated
Cargo.toml
and documentation. -
Added Sqlite3 file for supported error language strings.
-
-
Removed
i18n_error
crate as it is no longer needed after update of error handling.
Warning
|
This update has many API breaking changes for all existing i18n crates.
|
Main feature of this update is the adding of the i18n_error
crate to provide the ErrorMessage
to replace all the String
used for the Err()
results.
-
Added the
i18n_error
crate:-
Added
ErrorMessage
andErrorPlaceholderValue
.
-
-
Updated the
i18n_lstring
crate:-
To facilitate the usage of
ErrorMessage
, it is required that the error messages should almost have no crate dependencies, especially at times when the message system will not be used to localise the error message. Thus replacedRc<Locale>
withRc<String>
, whereString
represents a BCP 47 Language Tag. This affects theLString
struct, and methods:new
, andlocale
replaced withlanguage_tag
. -
Additional change to
new()
parameterstring
toInto<String>
instead ofString
as there are types that do have methods for type conversions. -
Updated unit tests, examples and documentation to reflect the changes.
-
-
Updated the
i18n_utility
crate:-
Changed
get()
:-
To return
ErrorMessage
upon locale parsing error, -
To use
AsRef<str>
instead ofString
for greater ease of use. -
To return a tuple pair of language tag (
Rc<String>
) and locale (Rc<Locale>
).
-
-
Added
get_language_tag()
to get only language tag. -
Added
get_locale()
to get only the locale. -
Updated unit tests, examples and documentation to reflect the changes.
-
-
Updated the
i18n_lexer
crate:-
To make use of
ErrorMessage
for errors. -
Change inputs of
&str
toAsRef<str>
for greater ease of use. -
Updated unit tests, examples and documentation to reflect the changes.
-
-
Updated the
i18n_pattern
crate:-
Updated the
parser
module:-
To make use of
ErrorMessage
for errors. -
Removed redundant semantic analysis code as
formatter
does include the semantic analysis.
-
-
Updated the
types
module:-
Changed
PlaceholderValue
to be an enum.
-
-
Updated the
formatter
module:-
To make use of
ErrorMessage
for errors. -
Change the pattern part structs to
PatternPart
enum.
-
-
Updated unit tests, examples and documentation to reflect the changes.
-
-
Updated the
i18n_pattern
crate:-
Split types from
parser
into own moduletypes
. -
Added
formatter
module. -
Removed semantic analysis from
parser
toformatter
module.
-
-
Minor improvement changes to crates:
i18n_lexer
andi18n_lstring
.
-
Added the
i18n_pattern
crate:-
Added
parser
module.
-
-
Added the
i18n_lexer
crate.
-
Added the
i18n_utility
crate:-
Added
locale
module:-
Added
LocaleRegistry
-
-
-
Fixed all the documentation of the project.