コード例 #1
0
def main():
    print("""
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
""")
    print('<table>\n')
    print((
        '<tr><td>Code</td><td>Name</td><td>Percentage translated</td><td>"%s"</td></tr>\n'
        % summary_str))
    for langid in sorted(setup.supported_languages()):
        assert (isinstance(langid, str))
        print('<tr lang="%s">' % (langid))
        native_name = bleachbit.Unix.Locales.native_locale_names[langid]
        print('<td>%s</td>' % langid)
        print('<td>%s</td>' % (native_name))
        lang = gettext.translation('bleachbit',
                                   localedir=dir_bb_locale,
                                   languages=[langid])
        lang.install()
        stats = get_translation_progress(langid)
        print('<td>%s</td>' % (stats))
        free_space = lang.gettext(summary_str)
        # print 'free_space =', free_space
        if free_space == summary_str:
            free_space = '&nbsp;'
        print('<td>%s</td>' % free_space)
        print('</tr>')
    print('</table>')
コード例 #2
0
def main():
    print """
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
"""
    print '<table>\n'
    print '<tr><td>Code</td><td>Name</td><td>Percentage translated</td><td>"%s"</td></tr>\n' % summary_str
    for langid in sorted(setup.supported_languages()):
        assert (isinstance(langid, str))
        print '<tr lang="%s">' % (langid)
        native_name = bleachbit.Unix.locales.native_name(langid)
        print '<td>%s</td>' % langid
        print '<td>%s</td>' % (native_name)
        lang = gettext.translation(
            'bleachbit', localedir=dir_bb_locale, languages=[langid])
        lang.install()
        stats = get_translation_progress(langid)
        print '<td>%s</td>' % (stats)
        free_space = lang.gettext(summary_str)
        # print 'free_space =', free_space
        if free_space == summary_str:
            free_space = '&nbsp;'
        print '<td>%s</td>' % free_space
        print '</tr>'
    print '</table>'
コード例 #3
0
def print_desktop_keys(key, value):
    print ('%s=%s' % (key, value))
    for langid in sorted(setup.supported_languages()):
        translated = get_lang_str(langid, value)
        if translated != value:
            print ('%s[%s]=%s' % (key, langid, translated))
コード例 #4
0
def print_desktop_keys(key, value):
    print '%s=%s' % (key, value)
    for langid in sorted(setup.supported_languages()):
        translated = get_lang_str(langid, value)
        if translated != value:
            print '%s[%s]=%s' % (key, langid, translated)