diff options
| author | George Hazan <george.hazan@gmail.com> | 2025-01-27 11:46:54 +0300 |
|---|---|---|
| committer | George Hazan <george.hazan@gmail.com> | 2025-01-27 11:46:54 +0300 |
| commit | 50077e614cbed92cf54a90b2546497fec153733f (patch) | |
| tree | a11553267a4bc4283636f791b1b47ee02e43fa91 | |
| parent | 67f83ebdce296c4bb9e7b8490d8bf862b5e6dc02 (diff) | |
fixes #4854 (NewStory: не переводится заголовок окна истории)
| -rw-r--r-- | plugins/NewStory/src/templates.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/NewStory/src/templates.cpp b/plugins/NewStory/src/templates.cpp index fc7d59f3f0..280ddd081f 100644 --- a/plugins/NewStory/src/templates.cpp +++ b/plugins/NewStory/src/templates.cpp @@ -427,18 +427,15 @@ CMStringW TplFormatString(int tpl, MCONTACT hContact, ItemData *item) return CMStringW();
auto &T = templates[tpl];
- if (T.value == nullptr)
- T.value = mir_wstrdup(T.defvalue);
+ wchar_t *pValue = TranslateW((T.value) ? T.value : T.defvalue);
TemplateVars vars;
-
for (auto &it : T.vf)
if (it)
it(&vars, hContact, item);
CMStringW buf;
-
- for (wchar_t *p = T.value; *p; p++) {
+ for (wchar_t *p = pValue; *p; p++) {
if (*p == '%') {
wchar_t *var = vars.GetVar((p[1] & 0xff));
if (var)
|
