From: Hihin Ruslan <ruslandh@gmail.com>
To: kde-russian@lists.kde.ru
Subject: Re: [kde-russian] kmplayer
Date: Wed, 8 Mar 2017 12:11:28 +0300
Message-ID: <201703081211.32570@ruslandh> (raw)
In-Reply-To: <6141211488936985@web21g.yandex.ru>
[-- Attachment #1: Type: text/plain, Size: 2812 bytes --]
Здравствуйте Виктор
В сообщении от 8 марта 2017 Виктор написал(a):
> Доброе утро всем!
> Здравствуйте, Руслан!
> Столкнулся с похожими строками, и не получается заставить их
> отображаться с переводом в этом приложении
> https://github.com/dangvd/ksmoothdock/tree/master/src. В этом
....
> Если сможете, подскажите пожалуйста, можно ли такое исправить.
> Пробовал подставлять строки, как у Вас сделано здесь
> https://phabricator.kde.org/D4111#308112c3 но получаю ошибку
Я вот смотрю эту функцию:
void KSmoothDock::createDefaultLaunchers() {
const int kNumItems = 7;
const char* const kItems[kNumItems][3] = {
// Name, icon name, command.
{"Home Folder", "system-file-manager", "dolphin"},
{"Show Desktop", "user-desktop", kShowDesktopCommand},
{"Terminal", "utilities-terminal", "konsole"},
{"Text Editor", "kate", "kate"},
{"Web Browser", "applications-internet", "firefox"},
{"Audio Player", "audio-headphones", "amarok"},
{"System
Settings", "preferences-desktop", "systemsettings5"}
};
for (int i = 0; i < kNumItems; ++i) {
items_.push_back(std::unique_ptr<DockItem>(
new Launcher(kItems[i][0], orientation_, kItems[i][1],
minSize_, maxSize_, kItems[i][2])));
}
}
Смотрю описание конструктора:
Launcher(const QString& label, Qt::Orientation orientation,
const QString& iconName, int minSize, int maxSize,
const QString& command);
Т.е. для классической локализации надо писать "кривой код", типа
switch (i)
{
case 0:
new Launcher(tr ("Home Folder"), orientation_,
tr(system-file-manager), minSize_, maxSize_, tr("dolphin"))));
....
}
явно в строке показывая строку замены.
Я не очень силён в английском, но теория изложена здесь, я думаю,
вы даже лучше меня можете в этом разобраться.
http://doc.qt.io/qt-5/i18n-source-translation.html
http://doc.qt.io/qt-5/internationalization.html
В частности, стоит обратить внимание на:
7. Use QT_TR_NOOP() for Translatable Data Text Strings
--
А ещё говорят так (fortune):
Politics, like religion, hold up the torches of matrydom to the
reformers of error. -- Thomas Jefferson
________________________________________________________________________
С уважением Хихин Руслан
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2017-03-08 9:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-12 15:47 ` Ruslan Hihin
2017-01-12 16:52 ` Ruslan Hihin
2017-01-12 17:15 ` Ruslan Hihin
2017-01-13 3:05 ` Alexander Potashev
2017-01-12 17:15 ` Yuri Chornoivan
2017-03-08 9:11 ` Hihin Ruslan [this message]
2017-05-21 12:53 ` Alexander Potashev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201703081211.32570@ruslandh \
--to=ruslandh@gmail.com \
--cc=kde-russian@lists.kde.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
рассылка русскоязычной группы пользователей и разработчиков KDE
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/kde-russian/0 kde-russian/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 kde-russian kde-russian/ http://lore.altlinux.org/kde-russian \
kde-russian@lists.kde.ru
public-inbox-index kde-russian
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.kde-russian
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git