Changed UI naming
This commit is contained in:
@ -55,10 +55,10 @@ private void configure()
|
||||
public:
|
||||
this()
|
||||
{
|
||||
super("install", 160, 72);
|
||||
super("UI_INSTALL", 160, 72);
|
||||
|
||||
auto ibut = new Button(null, "install");
|
||||
auto ubut = new Button(null, "uninstall");
|
||||
auto ibut = new Button(null, "UI_INSTALL");
|
||||
auto ubut = new Button(null, "UI_UNINSTALL");
|
||||
|
||||
ibut.click = (widget){install(); window.close(); return true;};
|
||||
ubut.click = (widget){uninstall(); window.close(); return true;};
|
||||
@ -74,7 +74,7 @@ private void configure()
|
||||
private void process(Action action)
|
||||
{
|
||||
if (!action.format)
|
||||
new InputPopup("select_format", (format){
|
||||
new InputPopup("UI_SELECT_FORMAT", (format){
|
||||
convertMedia(action.file_name, setExtension(action.file_name, format));
|
||||
});
|
||||
else
|
||||
|
||||
@ -17,11 +17,11 @@ import medimancer.popup;
|
||||
|
||||
void convertMedia(string from, string to)
|
||||
{
|
||||
enforce!UserError(exists(from), "file_does_not_exist");
|
||||
enforce!UserError(from != to, "destination_is_source");
|
||||
enforce!UserError(exists(from), "UI_FILE_DOES_NOT_EXIST");
|
||||
enforce!UserError(from != to, "UI_DESTINATION_IS_SOURCE");
|
||||
|
||||
auto probe = execute(["ffprobe", from]);
|
||||
enforce!UserError(!probe.status, "probe_failed");
|
||||
enforce!UserError(!probe.status, "UI_PROBE_FAILED");
|
||||
|
||||
Duration duration;
|
||||
int filled;
|
||||
@ -35,7 +35,7 @@ void convertMedia(string from, string to)
|
||||
duration = hours(hrs) + minutes(min) + seconds(sec) + msecs(msc);
|
||||
break;
|
||||
}
|
||||
enforce!UserError("probe_invalid");
|
||||
enforce!UserError("UI_PROBE_INVALID");
|
||||
|
||||
uint progress_end = cast(uint)duration.total!"msecs";
|
||||
uint progress = 0;
|
||||
@ -70,7 +70,7 @@ void convertMedia(string from, string to)
|
||||
}).executeInNewThread;
|
||||
|
||||
ProgressPopup popup;
|
||||
popup = new ProgressPopup("converting", {
|
||||
popup = new ProgressPopup("UI_CONVERTING", {
|
||||
if (progress == 1000)
|
||||
popup.finish();
|
||||
return progress;
|
||||
|
||||
@ -34,7 +34,7 @@ class ErrorPopup : Popup
|
||||
public:
|
||||
this(string message, bool raw = false)
|
||||
{
|
||||
super("error", 240, 64);
|
||||
super("UI_ERROR", 240, 64);
|
||||
if (raw)
|
||||
window.mainWidget = new TextWidget(null, RUI(message));
|
||||
else
|
||||
@ -52,7 +52,7 @@ public:
|
||||
super(label, 240, 96);
|
||||
|
||||
auto input = new EditLine();
|
||||
auto button = new Button(null, "enter");
|
||||
auto button = new Button(null, "UI_ENTER");
|
||||
auto box = new GroupBox(null, label);
|
||||
box.addChild(input);
|
||||
box.addChild(button);
|
||||
@ -76,7 +76,7 @@ public:
|
||||
this(string label, uint delegate() callback)
|
||||
{
|
||||
super(label, 512, 64);
|
||||
window.mainWidget = new Progress("progress", callback);
|
||||
window.mainWidget = new Progress("UI_PROGRESS", callback);
|
||||
timer = window.mainWidget.setTimer(Progress.updateRate);
|
||||
show();
|
||||
}
|
||||
|
||||
@ -1,14 +0,0 @@
|
||||
install = Install
|
||||
uninstall = Uninstall
|
||||
|
||||
error = Error
|
||||
enter = Enter
|
||||
progress = Progress
|
||||
|
||||
select_format = Select format
|
||||
|
||||
file_does_not_exist = File does not exist
|
||||
destination_is_source = Destination file is same as source
|
||||
probe_failed = Probe failed
|
||||
probe_invalid = Probe returned invalid data
|
||||
converting = Converting...
|
||||
@ -1,14 +0,0 @@
|
||||
install = Įrašyti
|
||||
uninstall = Ištrinti
|
||||
|
||||
error = Klaida
|
||||
enter = Toliau
|
||||
progress = Pažanga
|
||||
|
||||
select_format = Pasirinkite formatą
|
||||
|
||||
file_does_not_exist = Įrašas neegzistuoja
|
||||
destination_is_source = Galutinis įrašas lygus duotam
|
||||
probe_failed = Patikra nepavyko
|
||||
probe_invalid = Patikra atsakė klaidingai
|
||||
converting = Perašoma...
|
||||
14
views/res/i18n/std_en.ini
Normal file
14
views/res/i18n/std_en.ini
Normal file
@ -0,0 +1,14 @@
|
||||
UI_INSTALL = Install
|
||||
UI_UNINSTALL = Uninstall
|
||||
|
||||
UI_ERROR = Error
|
||||
UI_ENTER = Enter
|
||||
UI_PROGRESS = Progress
|
||||
|
||||
UI_SELECT_FORMAT = Select format
|
||||
|
||||
UI_FILE_DOES_NOT_EXIST = File does not exist
|
||||
UI_DESTINATION_IS_SOURCE = Destination file is same as source
|
||||
UI_PROBE_FAILED = Probe failed
|
||||
UI_PROBE_INVALID = Probe returned invalid data
|
||||
UI_CONVERTING = Converting...
|
||||
14
views/res/i18n/std_lt.ini
Normal file
14
views/res/i18n/std_lt.ini
Normal file
@ -0,0 +1,14 @@
|
||||
UI_INSTALL = Įrašyti
|
||||
UI_UNINSTALL = Ištrinti
|
||||
|
||||
UI_ERROR = Klaida
|
||||
UI_ENTER = Toliau
|
||||
UI_PROGRESS = Pažanga
|
||||
|
||||
UI_SELECT_FORMAT = Pasirinkite formatą
|
||||
|
||||
UI_FILE_DOES_NOT_EXIST = Įrašas neegzistuoja
|
||||
UI_DESTINATION_IS_SOURCE = Galutinis įrašas lygus duotam
|
||||
UI_PROBE_FAILED = Patikra nepavyko
|
||||
UI_PROBE_INVALID = Patikra atsakė klaidingai
|
||||
UI_CONVERTING = Perašoma...
|
||||
Reference in New Issue
Block a user