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