Fix translations domains to point to new toolkit
This commit is contained in:
parent
9717e5954b
commit
abe0de3ef8
@ -112,7 +112,7 @@ def main():
|
||||
config.locale_path)
|
||||
|
||||
gettext.bindtextdomain(bundle.get_bundle_id(), activity_locale_path)
|
||||
gettext.bindtextdomain('sugar-toolkit', config.locale_path)
|
||||
gettext.bindtextdomain('sugar-toolkit-gtk3', config.locale_path)
|
||||
gettext.textdomain(bundle.get_bundle_id())
|
||||
|
||||
splitted_module = args[0].rsplit('.', 1)
|
||||
|
@ -83,7 +83,7 @@ from sugar3.graphics.icon import Icon
|
||||
from sugar3.datastore import datastore
|
||||
from gi.repository import SugarExt
|
||||
|
||||
_ = lambda msg: gettext.dgettext('sugar-toolkit', msg)
|
||||
from gettext import gettext as _
|
||||
|
||||
SCOPE_PRIVATE = 'private'
|
||||
SCOPE_INVITE_ONLY = 'invite' # shouldn't be shown in UI, it's implicit
|
||||
|
@ -32,8 +32,7 @@ from sugar3.bundle.activitybundle import ActivityBundle
|
||||
from sugar3.graphics import style
|
||||
from sugar3.graphics.palettemenu import PaletteMenuBox
|
||||
|
||||
|
||||
_ = lambda msg: gettext.dgettext('sugar-toolkit', msg)
|
||||
from gettext import gettext as _
|
||||
|
||||
|
||||
def _create_activity_icon(metadata):
|
||||
|
@ -55,8 +55,7 @@ import math
|
||||
from sugar3.graphics import style
|
||||
from sugar3.graphics.icon import Icon
|
||||
|
||||
|
||||
_ = lambda msg: gettext.dgettext('sugar-toolkit', msg)
|
||||
from gettext import gettext as _
|
||||
|
||||
|
||||
class Alert(Gtk.EventBox):
|
||||
|
@ -28,8 +28,7 @@ from sugar3.graphics import style
|
||||
from sugar3.graphics.icon import Icon
|
||||
from sugar3.graphics.palette import Palette, ToolInvoker, WidgetInvoker
|
||||
|
||||
|
||||
_ = lambda msg: gettext.dgettext('sugar-toolkit', msg)
|
||||
from gettext import gettext as _
|
||||
|
||||
|
||||
def get_svg_color_string(color):
|
||||
|
@ -31,7 +31,7 @@ from gi.repository import Gio
|
||||
|
||||
from gi.repository import SugarExt
|
||||
|
||||
_ = lambda msg: gettext.dgettext('sugar-base', msg)
|
||||
from gettext import gettext as _
|
||||
|
||||
GENERIC_TYPE_TEXT = 'Text'
|
||||
GENERIC_TYPE_IMAGE = 'Image'
|
||||
|
@ -30,8 +30,7 @@ import tempfile
|
||||
import logging
|
||||
import atexit
|
||||
|
||||
|
||||
_ = lambda msg: gettext.dgettext('sugar-toolkit', msg)
|
||||
from gettext import gettext as _
|
||||
|
||||
|
||||
def printable_hash(in_hash):
|
||||
@ -270,10 +269,9 @@ def timestamp_to_elapsed_string(timestamp, max_levels=2):
|
||||
if key in _i18n_timestamps_cache:
|
||||
time_period += _i18n_timestamps_cache[key]
|
||||
else:
|
||||
tmp = gettext.dngettext('sugar-toolkit',
|
||||
name_singular,
|
||||
name_plural,
|
||||
elapsed_units)
|
||||
tmp = gettext.ngettext(name_singular,
|
||||
name_plural,
|
||||
elapsed_units)
|
||||
# FIXME: This is a hack so we don't crash when a translation
|
||||
# doesn't contain the expected number of placeholders (#2354)
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user