Skip to content

Commit

Permalink
Add button tooltips to translatable strings (issue #2705)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bionus committed Jul 14, 2022
1 parent f3c8921 commit d60a37f
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 21 deletions.
20 changes: 10 additions & 10 deletions src/gui/src/viewer/viewer-window-buttons.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ namespace ViewerWindowButtons
Delete
};

const ButtonState DefaultPrevState(0, QStringLiteral("<"), QStringLiteral("Previous search result"));
const ButtonState DefaultNextState(0, QStringLiteral(">"), QStringLiteral("Next search result"));
const ButtonState DefaultDetailsState(0, QObject::tr("Details"), QStringLiteral("Media details"));
const ButtonState DefaultSaveAsState(0, QObject::tr("Save as..."), QStringLiteral("Save to irregular location"));
const ButtonState DefaultPrevState(0, QStringLiteral("<"), QObject::tr("Previous search result"));
const ButtonState DefaultNextState(0, QStringLiteral(">"), QObject::tr("Next search result"));
const ButtonState DefaultDetailsState(0, QObject::tr("Details"), QObject::tr("Media details"));
const ButtonState DefaultSaveAsState(0, QObject::tr("Save as..."), QObject::tr("Save to irregular location"));

const ButtonState DefaultSaveStateSave(SaveState::Save, QObject::tr("Save"), QStringLiteral("Save to usual location"));
const ButtonState DefaultSaveStateSave(SaveState::Save, QObject::tr("Save"), QObject::tr("Save to usual location"));
const ButtonState DefaultSaveStateSaving(SaveState::Saving, QObject::tr("Saving..."), QStringLiteral(""));
const ButtonState DefaultSaveStateSaved(SaveState::Saved, QObject::tr("Saved!"), QStringLiteral(""));
const ButtonState DefaultSaveStateCopied(SaveState::Copied, QObject::tr("Copied!"), QStringLiteral(""));
Expand All @@ -36,13 +36,13 @@ namespace ViewerWindowButtons
const ButtonState DefaultSaveStateExistsDisk(SaveState::ExistsDisk, QObject::tr("Already saved"), QStringLiteral(""));
const ButtonState DefaultSaveStateDelete(SaveState::Delete, QObject::tr("Delete"), QStringLiteral(""));

const ButtonState DefaultSaveNQuitStateSave(SaveState::Save, QObject::tr("Save & close"), QStringLiteral("Save to usual location and close window"));
const ButtonState DefaultSaveNQuitStateSave(SaveState::Save, QObject::tr("Save & close"), QObject::tr("Save to usual location and close window"));
const ButtonState DefaultSaveNQuitStateSaving(SaveState::Saving, QObject::tr("Saving..."), QStringLiteral(""));
const ButtonState DefaultSaveNQuitStateClose(2, QObject::tr("Close"), QStringLiteral("")); // Consider adding this to SaveButtonState.

const ButtonState DefaultOpenState(0, QObject::tr("Open"), QStringLiteral("Open usual save location in new window"));
const ButtonState DefaultOpenState(0, QObject::tr("Open"), QObject::tr("Open usual save location in new window"));

const ButtonState DefaultSaveFavStateSave(SaveState::Save, QObject::tr("Save (fav)"), QStringLiteral("Save to favourite location"));
const ButtonState DefaultSaveFavStateSave(SaveState::Save, QObject::tr("Save (fav)"), QObject::tr("Save to favourite location"));
const ButtonState DefaultSaveFavStateSaving(SaveState::Saving, QObject::tr("Saving... (fav)"), QStringLiteral(""));
const ButtonState DefaultSaveFavStateSaved(SaveState::Saved, QObject::tr("Saved! (fav)"), QStringLiteral(""));
const ButtonState DefaultSaveFavStateCopied(SaveState::Copied, QObject::tr("Copied! (fav)"), QStringLiteral(""));
Expand All @@ -52,11 +52,11 @@ namespace ViewerWindowButtons
const ButtonState DefaultSaveFavStateExistsDisk(SaveState::ExistsDisk, QObject::tr("Already saved (fav)"), QStringLiteral(""));
const ButtonState DefaultSaveFavStateDelete(SaveState::Delete, QObject::tr("Delete (fav)"), QStringLiteral(""));

const ButtonState DefaultSaveNQuitFavStateSave(SaveState::Save, QObject::tr("Save & close (fav)"), QStringLiteral("Save to favourite location and close window"));
const ButtonState DefaultSaveNQuitFavStateSave(SaveState::Save, QObject::tr("Save & close (fav)"), QObject::tr("Save to favourite location and close window"));
const ButtonState DefaultSaveNQuitFavStateSaving(SaveState::Saving, QObject::tr("Saving... (fav)"), QStringLiteral(""));
const ButtonState DefaultSaveNQuitFavStateClose(2, QObject::tr("Close (fav)"), QStringLiteral("")); // Consider adding this to SaveButtonState.

const ButtonState DefaultOpenFavState(0, QObject::tr("Open (fav)"), QStringLiteral("Open favourite save location in new window"));
const ButtonState DefaultOpenFavState(0, QObject::tr("Open (fav)"), QObject::tr("Open favourite save location in new window"));


const QMap<unsigned short, ButtonState> DefaultStates {
Expand Down
72 changes: 61 additions & 11 deletions src/languages/YourLanguage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4259,21 +4259,46 @@ Please solve the issue before resuming the download.</source>
<source>GiB</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../gui/src/viewer/viewer-window-buttons.h" line="24"/>
<source>Previous search result</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../gui/src/viewer/viewer-window-buttons.h" line="25"/>
<source>Next search result</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../gui/src/viewer/viewer-window-buttons.h" line="26"/>
<source>Details</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../gui/src/viewer/viewer-window-buttons.h" line="26"/>
<source>Media details</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../gui/src/viewer/viewer-window-buttons.h" line="27"/>
<source>Save as...</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../gui/src/viewer/viewer-window-buttons.h" line="27"/>
<source>Save to irregular location</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../gui/src/viewer/viewer-window-buttons.h" line="29"/>
<source>Save</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../gui/src/viewer/viewer-window-buttons.h" line="29"/>
<source>Save to usual location</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../gui/src/viewer/viewer-window-buttons.h" line="30"/>
<location filename="../gui/src/viewer/viewer-window-buttons.h" line="40"/>
Expand Down Expand Up @@ -4320,6 +4345,11 @@ Please solve the issue before resuming the download.</source>
<source>Save &amp; close</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../gui/src/viewer/viewer-window-buttons.h" line="39"/>
<source>Save to usual location and close window</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../gui/src/viewer/viewer-window-buttons.h" line="41"/>
<source>Close</source>
Expand All @@ -4330,11 +4360,21 @@ Please solve the issue before resuming the download.</source>
<source>Open</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../gui/src/viewer/viewer-window-buttons.h" line="43"/>
<source>Open usual save location in new window</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../gui/src/viewer/viewer-window-buttons.h" line="45"/>
<source>Save (fav)</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../gui/src/viewer/viewer-window-buttons.h" line="45"/>
<source>Save to favourite location</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../gui/src/viewer/viewer-window-buttons.h" line="46"/>
<location filename="../gui/src/viewer/viewer-window-buttons.h" line="56"/>
Expand Down Expand Up @@ -4381,6 +4421,11 @@ Please solve the issue before resuming the download.</source>
<source>Save &amp; close (fav)</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../gui/src/viewer/viewer-window-buttons.h" line="55"/>
<source>Save to favourite location and close window</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../gui/src/viewer/viewer-window-buttons.h" line="57"/>
<source>Close (fav)</source>
Expand All @@ -4391,6 +4436,11 @@ Please solve the issue before resuming the download.</source>
<source>Open (fav)</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../gui/src/viewer/viewer-window-buttons.h" line="59"/>
<source>Open favourite save location in new window</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>RenameExisting1</name>
Expand Down Expand Up @@ -5658,49 +5708,49 @@ Please solve the issue before resuming the download.</source>
<context>
<name>TextEdit</name>
<message>
<location filename="../gui/src/ui/text-edit.cpp" line="179"/>
<location filename="../gui/src/ui/text-edit.cpp" line="180"/>
<source>Favorites</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../gui/src/ui/text-edit.cpp" line="188"/>
<location filename="../gui/src/ui/text-edit.cpp" line="207"/>
<location filename="../gui/src/ui/text-edit.cpp" line="189"/>
<location filename="../gui/src/ui/text-edit.cpp" line="208"/>
<source>Remove</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../gui/src/ui/text-edit.cpp" line="190"/>
<location filename="../gui/src/ui/text-edit.cpp" line="209"/>
<location filename="../gui/src/ui/text-edit.cpp" line="191"/>
<location filename="../gui/src/ui/text-edit.cpp" line="210"/>
<source>Add</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../gui/src/ui/text-edit.cpp" line="198"/>
<location filename="../gui/src/ui/text-edit.cpp" line="199"/>
<source>Kept for later</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../gui/src/ui/text-edit.cpp" line="216"/>
<location filename="../gui/src/ui/text-edit.cpp" line="217"/>
<source>Ratings</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../gui/src/ui/text-edit.cpp" line="227"/>
<location filename="../gui/src/ui/text-edit.cpp" line="228"/>
<source>Sortings</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../gui/src/ui/text-edit.cpp" line="249"/>
<location filename="../gui/src/ui/text-edit.cpp" line="250"/>
<source>Copy</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../gui/src/ui/text-edit.cpp" line="250"/>
<location filename="../gui/src/ui/text-edit.cpp" line="251"/>
<source>Cut</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../gui/src/ui/text-edit.cpp" line="252"/>
<location filename="../gui/src/ui/text-edit.cpp" line="253"/>
<source>Paste</source>
<translation type="unfinished"/>
</message>
Expand Down

0 comments on commit d60a37f

Please sign in to comment.