Пример #1
0
Compile translations into the translated messages.

:Copyright: (c) 2009 Accense Technology, Inc. All rights reserved.
:copyright: (c) 2009 by the Zine Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.

This file originally derives from Zine Project.
"""
import pickle
import struct
from os import listdir, path
import sys

import kay
kay.setup_syspath()

from optparse import OptionParser
from babel.messages.pofile import read_po
from babel.messages.mofile import write_mo

from kay.management.utils import (
  print_status, get_user_apps,
)

domains = ['messages', 'jsmessages']

def is_untranslated(obj):
  if not obj:
    return True
  elif isinstance(obj, basestring):
Пример #2
0
This script adds a new translation to Kay or Kay application.

:Copyright: (c) 2009 Accense Technology, Inc. All rights reserved.
:copyright: (c) 2009 by the Zine Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.

This file originally derives from Zine Project.
"""

from os import makedirs, path
from os.path import dirname, join, realpath, pardir, isdir, isfile
import sys

import kay
kay.setup_syspath()

from datetime import datetime
from babel import Locale, UnknownLocaleError
from babel.messages import Catalog
from babel.messages.pofile import read_po, write_po
from babel.util import LOCALTZ

from kay.management.utils import (
    print_status,
    get_user_apps,
)

domains = ['messages', 'jsmessages']