linguini-cli 0.1.0-alpha.3

Command-line interface for Linguini localization projects
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
pub(crate) fn pluralize<'a>(count: usize, singular: &'a str, plural: &'a str) -> &'a str {
    if count == 1 {
        singular
    } else {
        plural
    }
}

pub(crate) fn namespace_display(namespace: &str) -> String {
    if namespace.is_empty() {
        "<root>".to_owned()
    } else {
        namespace.to_owned()
    }
}