add deck config category

This commit is contained in:
Damien Elmes 2020-02-21 20:53:20 +10:00
parent f4b9aff58a
commit 6fd3d1e8b4
3 changed files with 10 additions and 0 deletions

View file

@ -22,6 +22,7 @@ enum StringsGroup {
STATISTICS = 6;
FILTERING = 7;
SCHEDULING = 8;
DECK_CONFIG = 9;
}
// 1-15 reserved for future use; 2047 for errors

View file

@ -0,0 +1,7 @@
# Used in the deck configuration screen to show how many decks are used
# by a particular configuration group, eg "Group1 (used by 3 decks)"
used-by-decks = used by { $decks ->
[one] 1 deck
*[other] {$decks} decks
}

View file

@ -62,6 +62,7 @@ fn ftl_fallback_for_group(group: StringsGroup) -> String {
StringsGroup::Statistics => include_str!("statistics.ftl"),
StringsGroup::Filtering => include_str!("filtering.ftl"),
StringsGroup::Scheduling => include_str!("scheduling.ftl"),
StringsGroup::DeckConfig => include_str!("deck-config.ftl"),
}
.to_string()
}
@ -79,6 +80,7 @@ fn localized_ftl_for_group(group: StringsGroup, lang_ftl_folder: &Path) -> Optio
StringsGroup::Statistics => "statistics.ftl",
StringsGroup::Filtering => "filtering.ftl",
StringsGroup::Scheduling => "scheduling.ftl",
StringsGroup::DeckConfig => "deck-config.ftl",
});
fs::read_to_string(&path)
.map_err(|e| {