[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - unotools/source
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Thu Sep 19 16:32:55 UTC 2019
unotools/source/i18n/resmgr.cxx | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
New commits:
commit d15d3921f03a5ac0955b722e63be8ee965ca2294
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Thu Sep 19 19:28:01 2019 +0300
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Thu Sep 19 18:31:52 2019 +0200
We need the de-CH 'ß' -> 'ss' code for iOS in another place too
In this branch there is both get() and nget().
Change-Id: Ib30ce719c466ce1da27892d2f284573937ca806e
Reviewed-on: https://gerrit.libreoffice.org/79224
Reviewed-by: Tor Lillqvist <tml at collabora.com>
Tested-by: Tor Lillqvist <tml at collabora.com>
diff --git a/unotools/source/i18n/resmgr.cxx b/unotools/source/i18n/resmgr.cxx
index 7649e94abe4c..ca384cf42a72 100644
--- a/unotools/source/i18n/resmgr.cxx
+++ b/unotools/source/i18n/resmgr.cxx
@@ -218,7 +218,15 @@ namespace Translate
//otherwise translate it
const std::string ret = boost::locale::pgettext(sContext.getStr(), pId, loc);
- return ExpandVariables(createFromUtf8(ret.data(), ret.size()));
+ OUString result(ExpandVariables(createFromUtf8(ret.data(), ret.size())));
+
+#ifdef IOS
+ // If it is de-CH, change sharp s to double s.
+ if (std::use_facet<boost::locale::info>(loc).country() == "CH" &&
+ std::use_facet<boost::locale::info>(loc).language() == "de")
+ result = result.replaceAll(OUString::fromUtf8("\xC3\x9F"), "ss");
+#endif
+ return result;
}
OUString nget(const char* pContextAndIds, int n, const std::locale &loc)
More information about the Libreoffice-commits
mailing list