| Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
|
|
Currently when we add new strings from strings.xml in the android app
and these gets added to message.pot by the translation script the
arguments get added only as "%s" and "%d" and any ordering is lost. This
means that if you would add a string to the android app that is
something like "%1$s %2$s %1$s" this would be added to messages.pot as
msgid "%s %s %s" and it would treat it as the string has 3 different
arguments instead of 2.
This PR changes the code so that when the Android strings.xml strings
are added to messages.pot the argument index (if it exists) is not
removed as it was previously.
So the Android string "%1$s %2$s %1$s" will now result in the exact same
string being added to messages.pot.
However, the current normalizaion behavior is kept when it comes to
checking if an Android string already exists in messages.pot, so e.g.
the string `"Not all our servers are %1$s-enabled. Therefore, we use
multihop automatically to enable %1$s with any server."` will still
match the current value in the pot file which is: `"Not all our servers
are %(daita)s-enabled. Therefore, we use multihop automatically to
enable %(daita)s with any server."` and no new string is
added to messages.pot.
|
|
|
|
|
|
|
|
|
|
|
|
Removes superfluous lifetime definitions. Simplifying the code
|
|
`err_derive` is unmaintained and will probably stop working with rust
edition 2024. `thiserror` is almost a drop-in replacement. This commit
simply replaces all occurences of `derive(err_derive::Error)` with
`derive(thiserror::Error)` and fixes the attributes, but the Error and
Display impls should be identical.
|
|
This new `clippy` lint was introduced in the latest Rust release (1.76).
|
|
|
|
To align more with the upcoming standardizations within the Rust
ecosystem which started with the release of `1.70.0` and the inevitable
deprecation of `lazy_static`.
|
|
|
|
|
|
|
|
|
|
The htmlize API changed slightly for improved performance and build
times. This just updates android/translations-converter to stay current.
All android/translations-converter tests pass.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This commit fixes most of the remaining clippy warnings in the codebase.
These warnings were the more semantically difficult ones to fix.
There are some warnings that remain from the rebase that will be fixed
in the upcoming PR.
|
|
This is a giant commit which performs only a clippy --fix.
Auditing can happen in two ways, either by reading every line or by
running a `cargo clippy --fix` on the previous commit and make sure that
the result is the same.
|
|
With the advent of the latest nightly, the unused macro expressions are
producing warnings, which fail the CI. So the unused expressions are
removed, and can be added back if they are ever required again.
|
|
The purpose of this is to:
* Comply better with the default Android project structure
(see https://developer.android.com/studio/build).
* Avoid conflicts between project and app dependencies and plugins.
|
|
|
|
Replaced by the new `match_str!` macro implementation.
|
|
A message string can be split among multiple lines, and this was not
properly handled. Now it is handled by separate states that join all the
lines it finds related to the message.
|
|
Test by moving the operands and by borrowing them. Also test appending
to a `MsgString`.
|
|
Allow joining two `MsgString`s, either by moving them or by borrowing
them.
|
|
Allowing appending to a `MsgString`.
|
|
Make it more robust, maintainable and readable.
|
|
Avoid panicking inside of `Parser`.
|
|
This is to allow `Eq` to be derived for the future
`gettext::parser::Error` type.
|
|
Prepare for refactoring the parsing logic to improve readability and
maintainability.
|
|
Adds plural entries.
|
|
Adds non-plural message entries.
|
|
Helper constructor to create the instance with an initial entry.
|
|
Makes it simpler to obtain an error when attempting to create an
instance from a formula string.
|
|
Helper method to parse a specified plural formula in order to create a
new empty `Messages` list with the plural form configured.
|
|
Instead of panicking on error.
|
|
|
|
Because it's also used for the messages template file.
|