Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/locale')
-rw-r--r--intern/locale/SConscript92
-rw-r--r--intern/locale/boost_locale_wrapper.cpp2
2 files changed, 2 insertions, 92 deletions
diff --git a/intern/locale/SConscript b/intern/locale/SConscript
deleted file mode 100644
index 02b4d6cda1b..00000000000
--- a/intern/locale/SConscript
+++ /dev/null
@@ -1,92 +0,0 @@
-#!/usr/bin/env python
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# The Original Code is Copyright (C) 2012, Blender Foundation
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): Bastien Montagne.
-#
-# ***** END GPL LICENSE BLOCK *****
-
-Import('env')
-
-sources = env.Glob('*.cpp')
-
-if env['OURPLATFORM'] in ['darwin']:
- # Cocoa code to read user locale on OSX
- sources.append('osx_user_locale.mm')
-
-incs = '.'
-defs = []
-
-if env['WITH_BF_INTERNATIONAL']:
- defs.append('WITH_INTERNATIONAL')
- incs += ' ' + env['BF_BOOST_INC']
-
-env.BlenderLib( 'bf_intern_locale', sources, Split(incs), defs, libtype=['intern','player'], priority=[10, 185])
-
-if env['WITH_BF_INTERNATIONAL']:
- import os
- from os.path import dirname
-
- def normpath(path):
- return os.path.abspath(os.path.normpath(path))
-
- # build directory
- source_dir = Dir('.').srcnode().path
- root_build_dir = normpath(env['BF_BUILDDIR'])
- root_source_dir = dirname(dirname(normpath(source_dir)))
- po_dir = os.path.join(root_source_dir, "release", "datafiles", "locale", "po")
- build_dir = os.path.join(root_build_dir, 'locale')
-
- if os.path.exists(po_dir):
- # create directory if needed
- if not os.path.exists(build_dir):
- os.makedirs(build_dir)
-
- msgfmt_tool = env.Clone()
- msgfmt_tool.Append(LINKFLAGS = env['PLATFORM_LINKFLAGS'])
-
- targetpath = root_build_dir + '/msgfmt'
-
- msgfmt_target = msgfmt_tool.Program(target = targetpath, source = ['msgfmt.cc'])
-
- locale = env.Clone()
-
- # dependencies
- dependencies = [msgfmt_target]
-
- # add command for each locale
- all_mo_files = []
- for f in os.listdir(po_dir):
- if not f.endswith(".po"):
- continue
-
- po_file = os.path.join(po_dir, f)
- mo_file = os.path.join(build_dir, os.path.splitext(f)[0] + ".mo")
-
- command = "\"%s\" \"%s\" \"%s\"" % (targetpath, po_file, mo_file)
-
- locale.Command(mo_file, po_file, command)
- locale.Depends(mo_file, dependencies)
-
- all_mo_files.append(mo_file)
-
- env.Depends("boost_locale_wrapper.cpp", all_mo_files)
diff --git a/intern/locale/boost_locale_wrapper.cpp b/intern/locale/boost_locale_wrapper.cpp
index 5eb2f7fe9d9..0707c0dd3e3 100644
--- a/intern/locale/boost_locale_wrapper.cpp
+++ b/intern/locale/boost_locale_wrapper.cpp
@@ -114,10 +114,12 @@ const char *bl_locale_pgettext(const char *msgctxt, const char *msgid)
}
catch(std::bad_cast const &e) { /* if std::has_facet<char_message_facet>(l) == false, LC_ALL = "C" case */
// std::cout << "bl_locale_pgettext(" << msgid << "): " << e.what() << " \n";
+ (void)e;
return msgid;
}
catch(std::exception const &e) {
// std::cout << "bl_locale_pgettext(" << msgctxt << ", " << msgid << "): " << e.what() << " \n";
+ (void)e;
return msgid;
}
}