easy_localization
easy_localization copied to clipboard
Locale key "zero" not parsed by the easy_localization:generate
Key of "zero": "blah blah" doesn’t appear in the generated LocalKeys file. If I change it to "zeron", for example - everything becomes fine. Is zero a reserved name or smth?
I'm having the exact same scenario with male
, female
and other
.
Example:
"question_3": {
"label": "Gender",
"options": {
"gender_female": "women",
"gender_male": "man",
"gender_other": "other"
}
}
produces:
static const question_3_label = 'question_3.label';
static const question_3_options_gender_female = 'question_3.options.gender_female';
static const question_3_options_gender_male = 'question_3.options.gender_male';
static const question_3_options_gender_other = 'question_3.options.gender_other';
static const question_3_options = 'question_3.options';
While:
"question_3": {
"label": "Gender",
"options": {
"female": "women",
"male": "man",
"other": "other"
}
}
produces:
static const question_3_label = 'question_3.label';
static const question_3_options = 'question_3.options';
This one about genders is surprisingly weird imho.
@Floul sounds like these are all reserved words: https://github.com/aissat/easy_localization/blob/develop/bin/generate.dart#L9
Although in the documentation there is an example using male
as a key.
I'm feeling confused, but that's why.
In this case I think it would be nice to see a list of the reserved names.
In this case I think it would be nice to see a list of the reserved names.
The list is in the provided link above (in my previous answer).
The current list of reserved names (although I don't know why these are reserved) is:
'few', 'many', 'one', 'other', 'two', 'zero', 'male', 'female',