diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2013-11-04 22:26:56 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2013-11-04 22:26:56 +0400 |
commit | 84daa5718856ed293fd38d138765d07b203c623c (patch) | |
tree | 87feede2983aa11f70443176e270b133f1873992 | |
parent | 13caf5cc14a6ecb38653a8b254c8f36bb2355a4c (diff) |
Update i18n tools for new build_hash...
-rw-r--r-- | release/scripts/modules/bl_i18n_utils/bl_extract_messages.py | 4 | ||||
-rw-r--r-- | release/scripts/modules/bl_i18n_utils/settings.py | 2 | ||||
-rw-r--r-- | release/scripts/modules/bl_i18n_utils/utils.py | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py index e9ed9a8de5b..429fea60d7a 100644 --- a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py +++ b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py @@ -791,10 +791,10 @@ def dump_src_messages(msgs, reports, settings): ##### Main functions! ##### def dump_messages(do_messages, do_checks, settings): bl_ver = "Blender " + bpy.app.version_string - bl_rev = bpy.app.build_revision + bl_hash = bpy.app.build_hash or b'0000000000000000000000000000000000000000' bl_date = datetime.datetime.strptime(bpy.app.build_date.decode() + "T" + bpy.app.build_time.decode(), "%Y-%m-%dT%H:%M:%S") - pot = utils.I18nMessages.gen_empty_messages(settings.PARSER_TEMPLATE_ID, bl_ver, bl_rev, bl_date, bl_date.year, + pot = utils.I18nMessages.gen_empty_messages(settings.PARSER_TEMPLATE_ID, bl_ver, bl_hash, bl_date, bl_date.year, settings=settings) msgs = pot.msgs diff --git a/release/scripts/modules/bl_i18n_utils/settings.py b/release/scripts/modules/bl_i18n_utils/settings.py index dba5099607c..300cd7ae955 100644 --- a/release/scripts/modules/bl_i18n_utils/settings.py +++ b/release/scripts/modules/bl_i18n_utils/settings.py @@ -146,7 +146,7 @@ PO_MSGSTR = "msgstr " PO_HEADER_KEY = (DEFAULT_CONTEXT, "") PO_HEADER_MSGSTR = ( - "Project-Id-Version: {blender_ver} (r{blender_rev})\\n\n" + "Project-Id-Version: {blender_ver} ({blender_hash})\\n\n" "Report-Msgid-Bugs-To: \\n\n" "POT-Creation-Date: {time}\\n\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\n" diff --git a/release/scripts/modules/bl_i18n_utils/utils.py b/release/scripts/modules/bl_i18n_utils/utils.py index feefd14fd28..53146fd0287 100644 --- a/release/scripts/modules/bl_i18n_utils/utils.py +++ b/release/scripts/modules/bl_i18n_utils/utils.py @@ -408,10 +408,10 @@ class I18nMessages: return getattr(collections, 'OrderedDict', dict)() @classmethod - def gen_empty_messages(cls, uid, blender_ver, blender_rev, time, year, default_copyright=True, settings=settings): + def gen_empty_messages(cls, uid, blender_ver, blender_hash, time, year, default_copyright=True, settings=settings): """Generate an empty I18nMessages object (only header is present!).""" fmt = settings.PO_HEADER_MSGSTR - msgstr = fmt.format(blender_ver=str(blender_ver), blender_rev=int(blender_rev), time=str(time), uid=str(uid)) + msgstr = fmt.format(blender_ver=str(blender_ver), blender_hash=blender_hash, time=str(time), uid=str(uid)) comment = "" if default_copyright: comment = settings.PO_HEADER_COMMENT_COPYRIGHT.format(year=str(year)) |