Merge pull request #392 from shiche/translations

Russian translations improvment
This commit is contained in:
Vadim Lopatin 2017-07-29 20:31:30 +03:00 committed by GitHub
commit 58f03df242
5 changed files with 43 additions and 10 deletions

View File

@ -45,6 +45,7 @@ private import std.utf : toUTF32;
private import std.string;
private import std.array;
private import std.conv : to;
private import std.conv : dtext;
private import std.array : split;
@ -266,7 +267,7 @@ class FileDialog : Dialog, CustomGridCellAdapter {
_entries = listDirectory(dir, attrFilter, selectedFilter());
} catch(Exception e) {
import dlangui.dialogs.msgbox;
auto msgBox = new MessageBox(UIString.fromRaw("Error"d), UIString.fromRaw(e.msg.toUTF32), window());
auto msgBox = new MessageBox(UIString.fromId("MESSAGE_ERROR"c), UIString.fromRaw(e.msg.toUTF32), window());
msgBox.show();
return false;
}
@ -585,7 +586,7 @@ class FileDialog : Dialog, CustomGridCellAdapter {
rightPanel = new VerticalLayout("main");
rightPanel.layoutHeight(FILL_PARENT).layoutWidth(FILL_PARENT);
rightPanel.addChild(new TextWidget(null, "Path:"d));
rightPanel.addChild(new TextWidget(null, UIString.fromId("MESSAGE_PATH"c) ~ ":"));
content.addChild(leftPanel);
content.addChild(rightPanel);
@ -626,9 +627,9 @@ class FileDialog : Dialog, CustomGridCellAdapter {
_fileList.layoutWidth(FILL_PARENT).layoutHeight(FILL_PARENT);
_fileList.resize(4, 3);
_fileList.setColTitle(0, " "d);
_fileList.setColTitle(1, "Name"d);
_fileList.setColTitle(2, "Size"d);
_fileList.setColTitle(3, "Modified"d);
_fileList.setColTitle(1, UIString.fromId("COL_NAME"c).value);
_fileList.setColTitle(2, UIString.fromId("COL_SIZE"c).value);
_fileList.setColTitle(3, UIString.fromId("COL_MODIFIED"c).value);
_fileList.showRowHeaders = false;
_fileList.rowSelect = true;
_fileList.multiSelect = _allowMultipleFiles;
@ -956,7 +957,7 @@ class FileNameEditLine : HorizontalLayout {
protected EditLine _edFileName;
protected Button _btn;
protected string[string] _filetypeIcons;
protected dstring _caption = "Open File"d;
protected dstring _caption;
protected uint _fileDialogFlags = DialogFlag.Modal | DialogFlag.Resizable | FileDialogFlag.FileMustExist | FileDialogFlag.EnableCreateDirectory;
protected FileFilterEntry[] _filters;
protected int _filterIndex;
@ -968,6 +969,7 @@ class FileNameEditLine : HorizontalLayout {
this(string ID = null) {
super(ID);
_caption = UIString.fromId("TITLE_OPEN_FILE"c).value;
_edFileName = new EditLine("FileNameEditLine_edFileName");
_edFileName.minWidth(BACKEND_CONSOLE ? 16 : 200);
_btn = new Button("FileNameEditLine_btnFile", "..."d);
@ -1060,7 +1062,7 @@ class DirEditLine : FileNameEditLine {
super(ID);
_fileDialogFlags = DialogFlag.Modal | DialogFlag.Resizable
| FileDialogFlag.FileMustExist | FileDialogFlag.SelectDirectory | FileDialogFlag.EnableCreateDirectory;
_caption = "Select directory"d;
_caption = UIString.fromId("ACTION_SELECT_DIRECTORY"c);
}
}

View File

@ -256,7 +256,7 @@ class ExecutableFileNameEditItem : SettingsItem {
import dlangui.dialogs.filedlg;
TextWidget lbl = new TextWidget(_id ~ "-label", _label);
FileNameEditLine ed = new FileNameEditLine(_id ~ "-filename-edit");
ed.addFilter(FileFilterEntry(UIString.fromRaw("Executable files"d), "*.exe", true));
ed.addFilter(FileFilterEntry(UIString.fromId("MESSAGE_EXECUTABLES"c), "*.exe", true));
ed.minWidth = 200;
Setting setting = settings.settingByPath(_id, SettingType.STRING);
string value = setting.strDef(_defaultValue);
@ -281,7 +281,7 @@ class PathNameEditItem : SettingsItem {
import dlangui.dialogs.filedlg;
TextWidget lbl = new TextWidget(_id ~ "-label", _label);
DirEditLine ed = new DirEditLine(_id ~ "-path-edit");
ed.addFilter(FileFilterEntry(UIString.fromRaw("All files"d), "*.*"));
ed.addFilter(FileFilterEntry(UIString.fromId("MESSAGE_ALL_FILES"c), "*.*"));
ed.minWidth = 200;
Setting setting = settings.settingByPath(_id, SettingType.STRING);
string value = setting.strDef(_defaultValue);

View File

@ -53,7 +53,7 @@ class SimpleBarChart : Widget {
trackHover = false;
styleId = "SIMPLE_BAR_CHART";
_axisX.arrowSize = 1;
title = "New chart"d;
title = UIString.fromId("TITLE_NEW_CHART"c);
measureTextToSetWidgetSize();
}

View File

@ -16,6 +16,7 @@ ACTION_SAVE_ALL=Save all
ACTION_DISCARD_CHANGES=Discard
ACTION_DISCARD_ALL=Discard all
ACTION_CREATE_DIRECTORY=New folder
ACTION_SELECT_DIRECTORY=Select directory
CREATE_NEW_FOLDER=Create new folder
INPUT_NAME_FOR_FOLDER=Input folder name
CREATE_FOLDER_ERROR_TITLE=Cannot create folder
@ -37,3 +38,14 @@ EDIT_FIND_CASE_SENSITIVE=Case sensitive
EDIT_FIND_WHOLE_WORDS=Whole words
EDIT_FIND_SELECTION_ONLY=Selection only
TITLE_OPEN_FILE=Open File
TITLE_NEW_CHART=New chart
COL_NAME=Name
COL_SIZE=Size
COL_MODIFIED=Modified
MESSAGE_ERROR=Error
MESSAGE_PATH=Path
MESSAGE_EXECUTABLES=Executable files
MESSAGE_ALL_FILES=All files

View File

@ -16,11 +16,18 @@ ACTION_SAVE_ALL=Сохранить все
ACTION_DISCARD_CHANGES=Отбросить изменения
ACTION_DISCARD_ALL=Отбросить все
ACTION_CREATE_DIRECTORY=Новая папка
ACTION_SELECT_DIRECTORY=Выбрать каталог
CREATE_NEW_FOLDER=Создать папку
INPUT_NAME_FOR_FOLDER=Введите имя для папки
CREATE_FOLDER_ERROR_TITLE=Ошибка создания папки
CREATE_FOLDER_ERROR_MESSAGE=Не удалось создать папку
ACTION_EDITOR_TOGGLE_BOOKMARK=Переключить закладку
ACTION_EDITOR_GOTO_NEXT_BOOKMARK=Перейти к следующей закладке
ACTION_EDITOR_GOTO_PREVIOUS_BOOKMARK=Перейти к предыдущей закладке
ACTION_FILE_SHOW_IN_FILE_MANAGER=Показать в файловом менеджере
EDIT_FIND_NEXT=Найти след
EDIT_FIND_PREV=Найти пред
EDIT_REPLACE_NEXT=Заменить
@ -28,3 +35,15 @@ EDIT_REPLACE_ALL=Заменить все
EDIT_FIND_CASE_SENSITIVE=С учетом регистра
EDIT_FIND_WHOLE_WORDS=Только слова целиком
EDIT_FIND_SELECTION_ONLY=Только в выделенном
TITLE_OPEN_FILE=Открыть файл
TITLE_NEW_CHART=Новый график
COL_NAME=Имя
COL_SIZE=Размер
COL_MODIFIED=Изменен
MESSAGE_ERROR=Ошибка
MESSAGE_PATH=Путь
MESSAGE_EXECUTABLES=Исполняемые файлы
MESSAGE_ALL_FILES=Все файлы