コード例 #1
0
ファイル: 01_new_language.py プロジェクト: brettle/aseba
                    found = True
                    # insert the text before the tag
                    out_file.write(inserted_text)
                out_file.write(line)
    if not found:
        print sys.stderr, "Tag not found in ", input_file
    return found


print "*****"
print "This will add a new language to the available translations."
print "We need first a few information."
print "*****"
print ""

translation_tools.init_commands()

name_en = raw_input("\nLanguage name (in English): ")
name = raw_input("Language name, as displayed to users (ex: Français): ")
print "\n***"
print "Hint: for a list a locales, you can look here: http://www.roseindia.net/tutorials/i18n/locales-list.shtml"
print "***\n"
code_lang = raw_input("Language code (ex: fr): ")
code_region = raw_input("Region code, if any (ex: ch): ")

if code_region == '':
    code = code_lang
else:
    code = code_lang + "_" + code_region

wikidot_url = ""
コード例 #2
0
                    found = True
                    # insert the text before the tag
                    out_file.write(inserted_text)
                out_file.write(line)
    if not found:
        print sys.stderr, "Tag not found in ", input_file
    return found


print "*****"
print "This will add a new language to the available translations."
print "We need first a few information."
print "*****"
print ""

translation_tools.init_commands()

name_en = raw_input("\nLanguage name (in English): ")
name = raw_input("Language name, as displayed to users (ex: Français): ")
print "\n***"
print "Hint: for a list a locales, you can look here: http://www.roseindia.net/tutorials/i18n/locales-list.shtml"
print "***\n"
code_lang = raw_input("Language code (ex: fr): ")
code_region = raw_input("Region code, if any (ex: ch): ")

if code_region == '':
    code = code_lang
else:
    code = code_lang + "_" + code_region

wikidot_url = ""