mirror of
https://github.com/lise-henry/crowbook
synced 2024-11-18 04:23:51 +01:00
Merge pull request #124 from d0whc3r/patch/add_catalan
feat: add catalan language
This commit is contained in:
commit
edfbec1081
10
lang/document/ca.yaml
Normal file
10
lang/document/ca.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
toc: Índex
|
||||
cover: Portada
|
||||
title: Títol
|
||||
chapter: Capítol
|
||||
part: Part
|
||||
|
||||
notes: Notes
|
||||
|
||||
display_all: Mostra tots els capítols
|
||||
display_one: Mostra un sol capítol
|
@ -7,6 +7,7 @@ static ES: &str = include_str!("../../lang/document/es.yaml");
|
||||
static FR: &str = include_str!("../../lang/document/fr.yaml");
|
||||
static RU: &str = include_str!("../../lang/document/ru.yaml");
|
||||
static DE: &str = include_str!("../../lang/document/de.yaml");
|
||||
static CA: &str = include_str!("../../lang/document/ca.yaml");
|
||||
|
||||
/// Get the hashmap for a given language
|
||||
pub fn get_hash(lang: &str) -> Hash {
|
||||
@ -19,6 +20,8 @@ pub fn get_hash(lang: &str) -> Hash {
|
||||
YamlLoader::load_from_str(DE).unwrap()
|
||||
} else if lang.starts_with("ru") {
|
||||
YamlLoader::load_from_str(RU).unwrap()
|
||||
} else if lang.starts_with("ca") {
|
||||
YamlLoader::load_from_str(CA).unwrap()
|
||||
} else {
|
||||
YamlLoader::load_from_str(EN).unwrap()
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user