diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2021-05-10 19:42:58 +0000 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2021-05-19 12:13:36 +0000 |
| commit | 7703ae1e04ea94162512991fc8348fb0e2ed2d10 (patch) | |
| tree | 4dfe9d988e7e31e17aa618b820e7dc80c9754c74 /android | |
| parent | 4da1dd0e776127b60e4b449dd4373d051a1ee065 (diff) | |
| download | mullvadvpn-7703ae1e04ea94162512991fc8348fb0e2ed2d10.tar.xz mullvadvpn-7703ae1e04ea94162512991fc8348fb0e2ed2d10.zip | |
Create a new `Normalize` trait
Place it in a new `normalize` module so that the all normalization code
is in a single module. This helps to make sure the normalized common
format is respected by all implementations.
Diffstat (limited to 'android')
| -rw-r--r-- | android/translations-converter/src/main.rs | 1 | ||||
| -rw-r--r-- | android/translations-converter/src/normalize.rs | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/android/translations-converter/src/main.rs b/android/translations-converter/src/main.rs index 583ed8c5e1..847d95ff54 100644 --- a/android/translations-converter/src/main.rs +++ b/android/translations-converter/src/main.rs @@ -33,6 +33,7 @@ mod android; mod gettext; +mod normalize; use std::{ collections::HashMap, diff --git a/android/translations-converter/src/normalize.rs b/android/translations-converter/src/normalize.rs new file mode 100644 index 0000000000..e9a2eb3757 --- /dev/null +++ b/android/translations-converter/src/normalize.rs @@ -0,0 +1,6 @@ +pub trait Normalize { + /// Normalize the string value into a common format. + /// + /// Makes it possible to compare different representations of translation messages. + fn normalize(&self) -> String; +} |
