diff options
author | Mika Westerberg <mika.westerberg@iki.fi> | 2009-03-16 14:00:45 +0200 |
---|---|---|
committer | Lauri Leukkunen <lle@rahina.org> | 2009-03-23 01:37:48 +0200 |
commit | 18a064f7bb06bad27a3d67ddf6e2c485bf69f87b (patch) | |
tree | 50cb4b05a987e2b9dc294b75cc70c9e0d65f9b73 /lua_scripts | |
parent | b88704b1331c6a7857cc4607d870ef0e58b5170d (diff) |
l10n: message catalogs are now mapped based on active exec policy
- Removed usage of native_app_message_catalog_prefix variable in
exec policy. There is no need for that anymore as we can find
out correct mappings using conditional rules.
- LOCPATH and NLSPATH are cleared always before exec so they don't
get inherited to child unless really needed.
- __SB2_REAL_BINARYNAME is not anymore needed but I left it there
in case there is some future needs for that.
Signed-off-by: Lauri Aarnio <Lauri.Aarnio@iki.fi>
Diffstat (limited to 'lua_scripts')
-rw-r--r-- | lua_scripts/pathmaps/devel/00_default.lua | 25 | ||||
-rw-r--r-- | lua_scripts/pathmaps/emulate/00_default.lua | 1 |
2 files changed, 18 insertions, 8 deletions
diff --git a/lua_scripts/pathmaps/devel/00_default.lua b/lua_scripts/pathmaps/devel/00_default.lua index a3201e4..c8a1fef 100644 --- a/lua_scripts/pathmaps/devel/00_default.lua +++ b/lua_scripts/pathmaps/devel/00_default.lua @@ -28,7 +28,6 @@ devel_mode_tools_ld_so = nil -- default = not needed devel_mode_tools_ld_library_path = nil -- default = not needed -- localization support for tools devel_mode_locale_path = nil -devel_mode_message_catalog_prefix = nil if ((tools_root ~= nil) and conf_tools_sb2_installed) then if (conf_tools_ld_so ~= nil) then @@ -39,8 +38,6 @@ if ((tools_root ~= nil) and conf_tools_sb2_installed) then if (conf_tools_locale_path ~= nil) then -- use locales from tools devel_mode_locale_path = conf_tools_locale_path - devel_mode_message_catalog_prefix = - conf_tools_message_catalog_prefix end end @@ -59,7 +56,6 @@ exec_policy_tools = { native_app_ld_so_supports_argv0 = conf_tools_ld_so_supports_argv0, native_app_ld_library_path = devel_mode_tools_ld_library_path, native_app_locale_path = devel_mode_locale_path, - native_app_message_catalog_prefix = devel_model_message_catalog_prefix, script_log_level = "debug", script_log_message = "SCRIPT from tools", @@ -73,7 +69,6 @@ exec_policy_tools_perl = { native_app_ld_so_supports_argv0 = conf_tools_ld_so_supports_argv0, native_app_ld_library_path = devel_mode_tools_ld_library_path, native_app_locale_path = devel_mode_locale_path, - native_app_message_catalog_prefix = devel_model_message_catalog_prefix, script_log_level = "debug", script_log_message = "SCRIPT from tools (t.p)", @@ -87,7 +82,6 @@ exec_policy_tools_python = { native_app_ld_so_supports_argv0 = conf_tools_ld_so_supports_argv0, native_app_ld_library_path = devel_mode_tools_ld_library_path, native_app_locale_path = devel_mode_locale_path, - native_app_message_catalog_prefix = devel_model_message_catalog_prefix, script_log_level = "debug", script_log_message = "SCRIPT from tools (t.p)", @@ -124,7 +118,8 @@ exec_policy_target = { name = "Rootstrap", native_app_ld_so = devel_mode_target_ld_so, native_app_ld_so_supports_argv0 = conf_target_ld_so_supports_argv0, - native_app_ld_library_path = devel_mode_target_ld_library_path + native_app_ld_library_path = devel_mode_target_ld_library_path, + native_app_locale_path = conf_target_locale_path, } -- @@ -211,6 +206,20 @@ terminfo_test = { { map_to = target_root, readonly = true } } +-- +-- Message catalogs (LC_MESSAGES) are taken based on +-- active exec policy. +-- +message_catalog_test = { + { if_active_exec_policy_is = "Tools", + map_to = tools, readonly = true }, + { if_active_exec_policy_is = "Rootstrap", + map_to = target_root, readonly = true }, + { if_active_exec_policy_is = "Host", + use_orig_path = true, readonly = true }, + { map_to = target_root, readonly = true } +} + -- =========== Mapping rule chains =========== -- Used when dir = "/usr/share/aclocal": @@ -299,6 +308,8 @@ devel_mode_rules_usr_share = { readonly = true}, {prefix = "/usr/share/terminfo", actions = terminfo_test}, + {prefix = "/usr/share/locale", + actions = message_catalog_test}, -- /usr/share/hildon* (this is a real prefix): -- (was added to map hildon-theme-layout-4) diff --git a/lua_scripts/pathmaps/emulate/00_default.lua b/lua_scripts/pathmaps/emulate/00_default.lua index 82fbe08..f22a1c4 100644 --- a/lua_scripts/pathmaps/emulate/00_default.lua +++ b/lua_scripts/pathmaps/emulate/00_default.lua @@ -223,7 +223,6 @@ local exec_policy_target = { native_app_ld_library_path_suffix = emulate_mode_target_ld_library_path_suffix, native_app_locale_path = conf_target_locale_path, - native_app_message_catalog_prefix = conf_target_message_catalog_prefix, } -- Note that the real path (mapped path) is used when looking up rules! |