summaryrefslogtreecommitdiff
path: root/src/systems/helpdoc.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/systems/helpdoc.rs')
-rw-r--r--src/systems/helpdoc.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/systems/helpdoc.rs b/src/systems/helpdoc.rs
new file mode 100644
index 0000000..4e5b2a6
--- /dev/null
+++ b/src/systems/helpdoc.rs
@@ -0,0 +1,18 @@
+pub mod helpdoc_viewer;
+
+helpdoc_system_macros::generate_helpdoc_mapping!();
+helpdoc_system_macros::generate_helpdoc_list!();
+helpdoc_system_macros::generate_helpdoc_test!();
+
+pub fn get_helpdoc<'a>(doc_name: &'a str, lang: &'a str) -> &'a str {
+ let doc = get_doc(doc_name, lang);
+ if doc.is_empty() && lang != "en" {
+ get_doc(doc_name, "en")
+ } else {
+ doc
+ }
+}
+
+pub fn get_helpdoc_list<'a>() -> Vec<&'a str> {
+ get_docs_list()
+}