summaryrefslogtreecommitdiff
path: root/src/map/script.h
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-05-17 15:11:00 +0200
committerHaru <haru@dotalux.com>2016-06-25 17:29:49 +0200
commit17f4709adeb4d9159359d901b1743de56348e7e4 (patch)
tree3fc1f6e69b85de8d31ce9ef5ec37c3aec149d81f /src/map/script.h
parentd77c30e5b348a0a9f960a0c16826432c5d85548f (diff)
downloadhercules-17f4709adeb4d9159359d901b1743de56348e7e4.tar.gz
hercules-17f4709adeb4d9159359d901b1743de56348e7e4.tar.bz2
hercules-17f4709adeb4d9159359d901b1743de56348e7e4.tar.xz
hercules-17f4709adeb4d9159359d901b1743de56348e7e4.zip
Added _$() macro to the script engine to mark a translatable string as format string
- Strings passed to sprintf should use the _$() macro instead of _(), to generate the .pot translation template with a directive to correctly handle the % sign. - Strings passed through _() are instead explicitly marked as regular (non format) strings if they contain '%'. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/script.h')
-rw-r--r--src/map/script.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/map/script.h b/src/map/script.h
index 133c205a7..7811cd64e 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -503,6 +503,7 @@ struct script_syntax_data {
int last_func; // buildin index of the last parsed function
unsigned int nested_call; //Dont really know what to call this
bool lang_macro_active; // Used to generate translation strings
+ bool lang_macro_fmtstring_active; // Used to generate translation strings
struct DBMap *translation_db; //non-null if this npc has any translated strings to be linked
};
@@ -624,6 +625,7 @@ struct script_interface {
int buildin_mes_offset;
int buildin_select_offset;
int buildin_lang_macro_offset;
+ int buildin_lang_macro_fmtstring_offset;
/* */
struct DBMap *translation_db;/* npc_name => DBMap (strings) */
VECTOR_DECL(uint8 *) translation_buf;