do multi lang
This commit is contained in:
parent
d69a176f3c
commit
d0775894b5
23 changed files with 59756 additions and 114 deletions
BIN
adv/taobin_adv_08.mp4
Executable file → Normal file
BIN
adv/taobin_adv_08.mp4
Executable file → Normal file
Binary file not shown.
BIN
adv/taobin_adv_menu2_08.mp4
Executable file → Normal file
BIN
adv/taobin_adv_menu2_08.mp4
Executable file → Normal file
Binary file not shown.
BIN
adv/taobin_adv_menu_08.mp4
Executable file → Normal file
BIN
adv/taobin_adv_menu_08.mp4
Executable file → Normal file
Binary file not shown.
|
|
@ -7,9 +7,16 @@ if param == "old":
|
|||
out_xml(f.read())
|
||||
f.close()
|
||||
else:
|
||||
print("new layout catalog enable.")
|
||||
f = open( directory_to_process + "/menu_catalog_new.xml", "r")
|
||||
#print(f.read())
|
||||
out_xml(f.read())
|
||||
f.close()
|
||||
if "v2" in param:
|
||||
print("new layout catalog ============================> inter.")
|
||||
f = open( directory_to_process + "/menu_catalog_new.lxml", "r")
|
||||
#print(f.read())
|
||||
out_xml(f.read())
|
||||
f.close()
|
||||
else:
|
||||
print("new layout catalog enable.")
|
||||
f = open( directory_to_process + "/menu_catalog_new.xml", "r")
|
||||
#print(f.read())
|
||||
out_xml(f.read())
|
||||
f.close()
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
if "v2" in param:
|
||||
idx_lang_thai = 2
|
||||
idx_lang_eng = 1
|
||||
|
||||
|
||||
idx_name = 0
|
||||
idx_desc = 1
|
||||
idx_img = 2
|
||||
|
|
@ -106,17 +110,24 @@
|
|||
out_xml('\t<Height> 296 </Height>\r\n')
|
||||
str_con = ""
|
||||
str_con_var = ""
|
||||
if spl[ idx_hot_product_code] != '-':
|
||||
#print("#########################################################################################################################")
|
||||
#print( str( spl))
|
||||
#print("#########################################################################################################################")
|
||||
if spl[ idx_name][ idx_hot_product_code] != '-':
|
||||
str_con += spl[ idx_name][ idx_hot_product_code] + '.Button,'
|
||||
if spl[ idx_cold_product_code] != '-':
|
||||
|
||||
if spl[ idx_name][ idx_cold_product_code] != '-':
|
||||
str_con += spl[ idx_name][ idx_cold_product_code] + '.Button,'
|
||||
if spl[ idx_blend_product_code] != '-':
|
||||
|
||||
if spl[ idx_name][ idx_blend_product_code] != '-':
|
||||
str_con += spl[ idx_name][ idx_blend_product_code] + '.Button,'
|
||||
|
||||
if spl[ idx_name][ idx_hot_product_code] != '-':
|
||||
str_con_var += spl[ idx_name][ idx_hot_product_code] + '-'
|
||||
|
||||
if spl[ idx_name][ idx_cold_product_code] != '-':
|
||||
str_con_var += spl[ idx_name][ idx_cold_product_code] + '-'
|
||||
|
||||
if spl[ idx_name][ idx_blend_product_code] != '-':
|
||||
str_con_var += spl[ idx_name][ idx_blend_product_code] + '-'
|
||||
|
||||
|
|
@ -244,10 +255,7 @@
|
|||
|
||||
out_xml( '\t\t\r\n')
|
||||
out_xml( '\t\t\r\n')
|
||||
if "inter" in param:
|
||||
out_xml( '\t\tOpen "ROOT/taobin_project/xml/page_topping_select5.xml"\r\n')
|
||||
else:
|
||||
out_xml( '\t\tOpen "ROOT/taobin_project/xml/page_topping_select4.xml"\r\n')
|
||||
out_xml( '\t\tOpen "ROOT/taobin_project/xml/page_topping_select5.xml"\r\n')
|
||||
out_xml( '\t\t\r\n')
|
||||
|
||||
|
||||
|
|
@ -260,15 +268,20 @@
|
|||
out_xml( '\t<Text>\r\n')
|
||||
out_xml( '\t<X> 16 </X>\r\n')
|
||||
out_xml( '\t<Y> 164 </Y>\r\n')
|
||||
out_xml( '\t<Size> 24 </Size>\r\n')
|
||||
out_xml( '\t<Width>220</Width>\r\n')
|
||||
out_xml( '\t<Size> 22 </Size>\r\n')
|
||||
out_xml( '\t<Width>222</Width>\r\n')
|
||||
out_xml( '\t<Mode> "multi2" </Mode>\r\n')
|
||||
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
||||
out_xml( '\t<Color> 0x322B26 </Color>\r\n')
|
||||
|
||||
out_xml( '\t<Language>\r\n')
|
||||
out_xml( '\t\t<Value> "' + spl[ idx_name][ 1].replace("\\n", "\n") + '" </Value>\r\n')
|
||||
out_xml( '\t</Language>\r\n')
|
||||
out_xml( '\t<LanguageGroup>\r\n')
|
||||
out_xml( '\t\t<LanguageSlot1>' + spl[ idx_name][ idx_lang_eng].replace("\\n", "\n") + '</LanguageSlot1>\r\n')
|
||||
out_xml( '\t\t<LanguageSlot2>' + spl[ idx_name][ idx_lang_thai].replace("\\n", "\n") + '</LanguageSlot2>\r\n')
|
||||
out_xml( '\t\t<LanguageSlot3>' + spl[ idx_name][ idx_lang_eng].replace("\\n", "\n") + '</LanguageSlot3>\r\n')
|
||||
out_xml( '\t\t<LanguageSlot4>' + spl[ idx_name][ idx_lang_thai].replace("\\n", "\n") + '</LanguageSlot4>\r\n')
|
||||
out_xml( '\t\t<LanguageSlot5>' + spl[ idx_name][ idx_lang_eng].replace("\\n", "\n") + '</LanguageSlot5>\r\n')
|
||||
out_xml( '\t\t<LanguageSlot6>' + spl[ idx_name][ idx_lang_thai].replace("\\n", "\n") + '</LanguageSlot6>\r\n')
|
||||
out_xml( '\t</LanguageGroup>\r\n')
|
||||
|
||||
out_xml( '\t</Text>\r\n')
|
||||
|
||||
|
|
@ -276,39 +289,22 @@
|
|||
out_xml( '\t<X> 16 </X>\r\n')
|
||||
out_xml( '\t<Y> 220 </Y>\r\n')
|
||||
out_xml( '\t<Size> 14 </Size>\r\n')
|
||||
out_xml( '\t<Width>220</Width>\r\n')
|
||||
out_xml( '\t<Width>222</Width>\r\n')
|
||||
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
||||
out_xml( '\t<Color> 0x6F5F51 </Color>\r\n')
|
||||
out_xml( '\t<State> showthaiText </State>\r\n')
|
||||
out_xml( '\t<Language>\r\n')
|
||||
out_xml( '\t\t<Value> "' + spl[idx_desc][ 1].replace("\\n", "\n") + '" </Value>\r\n')
|
||||
out_xml( '\t</Language>\r\n')
|
||||
out_xml( '\t<LanguageGroup>\r\n')
|
||||
out_xml( '\t\t<LanguageSlot1>' + spl[ idx_desc][ idx_lang_eng].replace("\\n", "\n") + '</LanguageSlot1>\r\n')
|
||||
out_xml( '\t\t<LanguageSlot2>' + spl[ idx_desc][ idx_lang_thai].replace("\\n", "\n") + '</LanguageSlot2>\r\n')
|
||||
out_xml( '\t\t<LanguageSlot3>' + spl[ idx_desc][ idx_lang_eng].replace("\\n", "\n") + '</LanguageSlot3>\r\n')
|
||||
out_xml( '\t\t<LanguageSlot4>' + spl[ idx_desc][ idx_lang_thai].replace("\\n", "\n") + '</LanguageSlot4>\r\n')
|
||||
out_xml( '\t\t<LanguageSlot5>' + spl[ idx_desc][ idx_lang_eng].replace("\\n", "\n") + '</LanguageSlot5>\r\n')
|
||||
out_xml( '\t\t<LanguageSlot6>' + spl[ idx_desc][ idx_lang_thai].replace("\\n", "\n") + '</LanguageSlot6>\r\n')
|
||||
out_xml( '\t</LanguageGroup>\r\n')
|
||||
|
||||
out_xml( '\t</Text>\r\n')
|
||||
|
||||
|
||||
#out_xml( '\t<Text>\r\n')
|
||||
#out_xml( '\t<X> 16 </X>\r\n')
|
||||
#out_xml( '\t<Y> 164 </Y>\r\n')
|
||||
#out_xml( '\t<Size> 22 </Size>\r\n')
|
||||
#out_xml( '\t<Width>220</Width>\r\n')
|
||||
#out_xml( '\t<Mode> "multi2" </Mode>\r\n')
|
||||
#out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
||||
#out_xml( '\t<Color> 0x322B26 </Color>\r\n')
|
||||
#out_xml( '\t<State> showengText </State>\r\n')
|
||||
#out_xml( '\t<Value> "' + spl[ idx_of_eng_des].replace("\\n", "\n") + '" </Value>\r\n')
|
||||
#out_xml( '\t</Text>\r\n')
|
||||
|
||||
#out_xml( '\t<Text>\r\n')
|
||||
#out_xml( '\t<X> 16 </X>\r\n')
|
||||
#out_xml( '\t<Y> 220 </Y>\r\n')
|
||||
#out_xml( '\t<Size> 14 </Size>\r\n')
|
||||
#out_xml( '\t<Width>220</Width>\r\n')
|
||||
#out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
|
||||
#out_xml( '\t<Color> 0x6F5F51 </Color>\r\n')
|
||||
#out_xml( '\t<State> showengText </State>\r\n')
|
||||
#out_xml( '\t<Value> "' + spl[ idx_of_thai_des].replace("\\n", "\n") + '" </Value>\r\n')
|
||||
#out_xml( '\t</Text>\r\n')
|
||||
|
||||
out_xml( '\t<Image>\r\n')
|
||||
out_xml( '\t<X> 16 </X>\r\n')
|
||||
|
|
@ -506,32 +502,28 @@
|
|||
out_xml( '\t</Text>\r\n')
|
||||
|
||||
|
||||
if param == "old":
|
||||
print(";param=" + param)
|
||||
else:
|
||||
|
||||
out_xml( '\t<Text>\r\n')
|
||||
out_xml( '\t<X> 48 </X>\r\n')
|
||||
out_xml( '\t<Y> 116 </Y>\r\n')
|
||||
out_xml( '\t<Size> 32 </Size>\r\n')
|
||||
out_xml( '\t<Width>128</Width>\r\n')
|
||||
out_xml( '\t<Height>64</Height>\r\n')
|
||||
out_xml( '\t<Font> MITRegularTTF </Font>\r\n')
|
||||
out_xml( '\t<Color> 0x5A5A5A </Color>\r\n')
|
||||
out_xml( '\t<Mode> "disable-show" </Mode>\r\n')
|
||||
out_xml( '\t<State> $Sum' + str_con_var +' </State> \r\n')
|
||||
out_xml( '\t<Value> text_unavailable </Value>\r\n')
|
||||
out_xml( '\t<Align> center-vertical-horizontal </Align>\r\n')
|
||||
out_xml( '\t</Text>\r\n')
|
||||
out_xml( '\t<Text>\r\n')
|
||||
out_xml( '\t<X> 48 </X>\r\n')
|
||||
out_xml( '\t<Y> 116 </Y>\r\n')
|
||||
out_xml( '\t<Size> 32 </Size>\r\n')
|
||||
out_xml( '\t<Width>128</Width>\r\n')
|
||||
out_xml( '\t<Height>64</Height>\r\n')
|
||||
out_xml( '\t<Font> MITRegularTTF </Font>\r\n')
|
||||
out_xml( '\t<Color> 0x5A5A5A </Color>\r\n')
|
||||
out_xml( '\t<Mode> "disable-show" </Mode>\r\n')
|
||||
out_xml( '\t<State> $Sum' + str_con_var +' </State> \r\n')
|
||||
out_xml( '\t<Value> text_unavailable </Value>\r\n')
|
||||
out_xml( '\t<Align> center-vertical-horizontal </Align>\r\n')
|
||||
out_xml( '\t</Text>\r\n')
|
||||
|
||||
|
||||
out_xml( '</Block>\r\n')
|
||||
|
||||
|
||||
|
||||
count_test = count_test + 1
|
||||
if count_test > 4 :
|
||||
break
|
||||
#print("++++++++++++++++++++++++++++++ " + str( count_test) )
|
||||
#count_test = count_test + 1
|
||||
#if count_test > 5 :
|
||||
# break
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -47,9 +47,14 @@
|
|||
|
||||
|
||||
|
||||
|
||||
<?hurr
|
||||
#include=menu_new_layout_gen_v2.py
|
||||
?>
|
||||
<?hurr
|
||||
#include=menu_new_layout_gen.py
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</Popup>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -37,9 +37,14 @@
|
|||
|
||||
|
||||
|
||||
|
||||
<?hurr
|
||||
#include=menu_new_layout_gen_v2.py
|
||||
?>
|
||||
<?hurr
|
||||
#include=menu_new_layout_gen.py
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</Popup>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -37,10 +37,15 @@
|
|||
|
||||
|
||||
|
||||
|
||||
<?hurr
|
||||
#include=menu_new_layout_gen_v2.py
|
||||
?>
|
||||
<?hurr
|
||||
#include=menu_new_layout_gen.py
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
</Popup>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -47,6 +47,11 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<?hurr
|
||||
#include=menu_new_layout_gen_v2.py
|
||||
?>
|
||||
<?hurr
|
||||
#include=menu_new_layout_gen.py
|
||||
?>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -34,9 +34,14 @@
|
|||
|
||||
|
||||
|
||||
|
||||
<?hurr
|
||||
#include=menu_new_layout_gen_v2.py
|
||||
?>
|
||||
<?hurr
|
||||
#include=menu_new_layout_gen.py
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</Popup>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -37,6 +37,10 @@
|
|||
|
||||
|
||||
|
||||
|
||||
<?hurr
|
||||
#include=menu_new_layout_gen_v2.py
|
||||
?>
|
||||
<?hurr
|
||||
#include=menu_new_layout_gen.py
|
||||
?>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -37,6 +37,13 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?hurr
|
||||
#include=menu_new_layout_gen_v2.py
|
||||
?>
|
||||
<?hurr
|
||||
#include=menu_new_layout_gen.py
|
||||
?>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -42,6 +42,11 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
<?hurr
|
||||
#include=menu_new_layout_gen_v2.py
|
||||
?>
|
||||
<?hurr
|
||||
#include=menu_new_layout_gen.py
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue