Add missing language strings for layer/frame/anidir comboboxes

This commit is contained in:
Joshua Ogunyinka 2022-01-07 10:56:45 +04:00 committed by David Capello
parent dd2efe28d2
commit 9105642dbf
2 changed files with 29 additions and 9 deletions

View File

@ -10,6 +10,11 @@ description = You are going to enter in "Advanced Mode".
shortcut = Shortcut:
right_click = Right-click: Show playback options
[anidir_combo]
forward = Forward
reverse = Reverse
ping_pong = Ping-pong
[ask_for_color_profile]
title = Color Profile
sprite_with_profile = The sprite contains a color profile.
@ -846,6 +851,11 @@ all_cels_tooltip = Apply to all cels in the sprite
[font_popup]
load = Load
[frame_combo]
all_frames = All frames
selected_frames = Selected frames
tag = Tag:
[frame_properties]
title = Frame Properties
frame_number = Frame number:
@ -1021,6 +1031,12 @@ trigger_right_mouse_button = Trigger Right Mouse Button
ok = &OK
cancel = &Cancel
[layer_combo]
group = Group:
layer = Layer:
selected_layers = Selected layers
visible_layers = Visible layers
[layer_properties]
title = Layer Properties
name = Name:

View File

@ -11,6 +11,7 @@
#include "app/ui/layer_frame_comboboxes.h"
#include "app/i18n/strings.h"
#include "app/restore_visible_layers.h"
#include "app/site.h"
#include "doc/anidir.h"
@ -56,12 +57,15 @@ std::string LayerListItem::buildName(const doc::Layer* layer)
name.insert(0, layer->name());
layer = layer->parent();
}
name.insert(0, isGroup ? "Group: ": "Layer: ");
const std::string namePrefix =
(isGroup ? Strings::layer_combo_group() :
Strings::layer_combo_layer()) + " ";
name.insert(0, namePrefix);
return name;
}
FrameListItem::FrameListItem(doc::Tag* tag)
: ListItem("Tag: " + tag->name())
: ListItem(Strings::frame_combo_tag() + " " + tag->name())
, m_tag(tag)
{
setValue(m_tag->name());
@ -89,10 +93,10 @@ void fill_area_combobox(const doc::Sprite* sprite, ui::ComboBox* area, const std
void fill_layers_combobox(const doc::Sprite* sprite, ui::ComboBox* layers, const std::string& defLayer, const int defLayerIndex)
{
int i = layers->addItem("Visible layers");
int i = layers->addItem(Strings::layer_combo_visible_layers());
dynamic_cast<ui::ListItem*>(layers->getItem(i))->setValue(kAllLayers);
i = layers->addItem("Selected layers");
i = layers->addItem(Strings::layer_combo_selected_layers());
dynamic_cast<ui::ListItem*>(layers->getItem(i))->setValue(kSelectedLayers);
if (defLayer == kSelectedLayers)
layers->setSelectedItemIndex(i);
@ -113,10 +117,10 @@ void fill_layers_combobox(const doc::Sprite* sprite, ui::ComboBox* layers, const
void fill_frames_combobox(const doc::Sprite* sprite, ui::ComboBox* frames, const std::string& defFrame)
{
int i = frames->addItem("All frames");
int i = frames->addItem(Strings::frame_combo_all_frames());
dynamic_cast<ui::ListItem*>(frames->getItem(i))->setValue(kAllFrames);
i = frames->addItem("Selected frames");
i = frames->addItem(Strings::frame_combo_selected_frames());
dynamic_cast<ui::ListItem*>(frames->getItem(i))->setValue(kSelectedFrames);
if (defFrame == kSelectedFrames)
frames->setSelectedItemIndex(i);
@ -139,9 +143,9 @@ void fill_anidir_combobox(ui::ComboBox* anidir, doc::AniDir defAnidir)
int(doc::AniDir::REVERSE) == 1 &&
int(doc::AniDir::PING_PONG) == 2, "doc::AniDir has changed");
anidir->addItem("Forward");
anidir->addItem("Reverse");
anidir->addItem("Ping-pong");
anidir->addItem(Strings::anidir_combo_forward());
anidir->addItem(Strings::anidir_combo_reverse());
anidir->addItem(Strings::anidir_combo_ping_pong());
anidir->setSelectedItemIndex(int(defAnidir));
}