Exemplo n.º 1
0
def set_language(lang):
    """Sets the language. If "C", all text is untranslated."""
    po.install(None if lang == "C" else po.find(lang))
Exemplo n.º 2
0
def set_language(lang):
    """Sets the language. If "C", all text is untranslated."""
    po.install(None if lang == "C" else po.find(lang))
Exemplo n.º 3
0
# regexp to adjust links to images in html
images_re = re.compile(r'''([Ss][Rr][Cc]\s*=\s*'''
                       r'''['"])((?:''' + '|'.join(map(re.escape, images)) +
                       r''')['"])''')

# avoid reading settings
os.environ["XDG_CONFIG_HOME"] = ""

# make frescobaldi_app accessible
import frescobaldi_app.toplevel
import po
import help.helpimpl
import help.contents
import language_names

po.install(None)

# create a MainWindow because of the keyboard shortcuts!
import mainwindow

w = mainwindow.MainWindow()


def set_language(lang):
    """Sets the language. If "C", all text is untranslated."""
    po.install(None if lang == "C" else po.find(lang))


def make_filename(name, lang):
    """Adds the language name to the filename (which must have an extension)."""
    if lang not in ("C", None):
Exemplo n.º 4
0
# regexp to adjust links to images in html
images_re = re.compile(
    r'''([Ss][Rr][Cc]\s*=\s*'''
    r'''['"])((?:''' + '|'.join(map(re.escape, images)) + r''')['"])''')

# avoid reading settings
os.environ["XDG_CONFIG_HOME"] = ""

# make frescobaldi_app accessible
import frescobaldi_app.toplevel
import po
import help.helpimpl
import help.contents
import language_names

po.install(None)

# create a MainWindow because of the keyboard shortcuts!
import mainwindow
w = mainwindow.MainWindow()


def set_language(lang):
    """Sets the language. If "C", all text is untranslated."""
    po.install(None if lang == "C" else po.find(lang))


def make_filename(name, lang):
    """Adds the language name to the filename (which must have an extension)."""
    if lang not in ("C", None):
        name = name.replace('.', '.' + lang + '.')