Make templates localizable (Closes #100)

This commit is contained in:
Twan van Laarhoven
2020-10-03 14:38:39 +02:00
parent f2ae3ae43b
commit c7377303cf
23 changed files with 155 additions and 63 deletions
+1
View File
@@ -56,6 +56,7 @@ public:
template <typename T> void handle(const Scriptable<T>& );
template <typename T> void handle(const vector<T>& c) { value = to_script(&c); }
template <typename K, typename V> void handle(const map<K,V>& c) { value = to_script(&c); }
template <typename K, typename V> void handle(const unordered_map<K,V>& c) { value = to_script(&c); }
template <typename K, typename V> void handle(const IndexMap<K,V>& c) { value = to_script(&c); }
template <typename K, typename V> void handle(const DelayedIndexMaps<K,V>&) {}
template <typename K, typename V> void handle(const DelayedIndexMapsData<K,V>& c);
+2
View File
@@ -49,9 +49,11 @@ String identity(const String&);
String tr(LocaleCategory cat, const String& key, DefaultLocaleFun def = warn_and_identity);
/// Translate 'key' in the for a Package using the current locale
[[deprecated]]
String tr(const Package&, const String& key, DefaultLocaleFun def);
/// Translate 'key' in the for a Package using the current locale
[[deprecated]]
String tr(const Package&, const String& subcat, const String& key, DefaultLocaleFun def);
/// A localized string for menus