Translations and cleanups
This commit is contained in:
@@ -52,7 +52,8 @@ enum {
|
||||
STRING_GHOSTPCL_ERROR_TITLE, /* "Unable to initialize GhostPCL" */
|
||||
STRING_GHOSTPCL_ERROR_DESC, /* "gpcl6dll32.dll/gpcl6dll64.dll/libgpcl6 is required..." */
|
||||
STRING_ESCP_ERROR_TITLE, /* "Unable to find Dot-Matrix fonts" */
|
||||
STRING_ESCP_ERROR_DESC /* "TrueType fonts in the \"roms/printer/fonts\" directory..." */
|
||||
STRING_ESCP_ERROR_DESC, /* "TrueType fonts in the \"roms/printer/fonts\" directory..." */
|
||||
STRING_EDID_TOO_LARGE, /* "EDID file \"%ls\" is too large (%lld bytes)." */
|
||||
};
|
||||
|
||||
/* The Win32 API uses _wcsicmp. */
|
||||
|
||||
@@ -2954,3 +2954,15 @@ msgstr ""
|
||||
|
||||
msgid "CGA composite settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Monitor EDID"
|
||||
msgstr ""
|
||||
|
||||
msgid "Export..."
|
||||
msgstr ""
|
||||
|
||||
msgid "Export EDID"
|
||||
msgid ""
|
||||
|
||||
msgid "EDID file \"%ls\" is too large."
|
||||
msgstr ""
|
||||
@@ -2954,3 +2954,15 @@ msgstr "Nastavení kompozitního výstupu &CGA..."
|
||||
|
||||
msgid "CGA composite settings"
|
||||
msgstr "Nastavení kompozitního výstupu CGA"
|
||||
|
||||
msgid "Monitor EDID"
|
||||
msgstr "EDID monitoru"
|
||||
|
||||
msgid "Export..."
|
||||
msgstr "Exportovat..."
|
||||
|
||||
msgid "Export EDID"
|
||||
msgstr "Exportovat EDID"
|
||||
|
||||
msgid "EDID file \"%ls\" is too large."
|
||||
msgstr "Soubor EDID \"%ls\" je příliš velký."
|
||||
|
||||
@@ -2954,3 +2954,15 @@ msgstr "Optionen des &CGA-Composite-Modus..."
|
||||
|
||||
msgid "CGA composite settings"
|
||||
msgstr "Optionen des CGA-Composite-Modus"
|
||||
|
||||
msgid "Monitor EDID"
|
||||
msgstr "EDID des Monitors"
|
||||
|
||||
msgid "Export..."
|
||||
msgstr "Exportieren..."
|
||||
|
||||
msgid "Export EDID"
|
||||
msgstr "EDID exportieren"
|
||||
|
||||
msgid "EDID file \"%ls\" is too large."
|
||||
msgstr "Die EDID-Datei \"%ls\" ist zu groß."
|
||||
|
||||
@@ -2954,3 +2954,15 @@ msgstr "Configuración del modo compuesto &CGA..."
|
||||
|
||||
msgid "CGA composite settings"
|
||||
msgstr "Configuración del modo compuesto CGA"
|
||||
|
||||
msgid "Monitor EDID"
|
||||
msgstr "EDID du moniteur"
|
||||
|
||||
msgid "Export..."
|
||||
msgstr "Exporter..."
|
||||
|
||||
msgid "Export EDID"
|
||||
msgstr "EDID exportieren"
|
||||
|
||||
msgid "EDID file \"%ls\" is too large."
|
||||
msgstr "El archivo EDID \"%ls\" es demasiado grande."
|
||||
|
||||
@@ -2957,3 +2957,6 @@ msgstr "&CGA:n komposiittiasetukset..."
|
||||
|
||||
msgid "CGA composite settings"
|
||||
msgstr "CGA:n komposiittiasetukset"
|
||||
|
||||
msgid "EDID file \"%ls\" is too large."
|
||||
msgstr "EDID-tiedosto \"%ls\" on liian suuri."
|
||||
|
||||
@@ -2954,3 +2954,6 @@ msgstr "Réglages du mode composite &CGA..."
|
||||
|
||||
msgid "CGA composite settings"
|
||||
msgstr "Réglages du mode composite CGA"
|
||||
|
||||
msgid "EDID file \"%ls\" is too large."
|
||||
msgstr "Le fichier EDID \"%ls\" est trop volumineux."
|
||||
|
||||
@@ -2954,3 +2954,15 @@ msgstr "Opcije kompozitnog načina &CGA..."
|
||||
|
||||
msgid "CGA composite settings"
|
||||
msgstr "Opcije kompozitnog načina CGA"
|
||||
|
||||
msgid "Monitor EDID"
|
||||
msgstr "EDID monitora"
|
||||
|
||||
msgid "Export..."
|
||||
msgstr "Izvoz..."
|
||||
|
||||
msgid "Export EDID"
|
||||
msgstr "Izvoz EDID-a"
|
||||
|
||||
msgid "EDID file \"%ls\" is too large."
|
||||
msgstr "EDID datoteka \"%ls\" je prevelika."
|
||||
|
||||
@@ -2954,3 +2954,15 @@ msgstr "Impostazioni video composito &CGA..."
|
||||
|
||||
msgid "CGA composite settings"
|
||||
msgstr "Impostazioni video composito CGA"
|
||||
|
||||
msgid "Monitor EDID"
|
||||
msgstr "EDID del monitor"
|
||||
|
||||
msgid "Export..."
|
||||
msgstr "Esporta..."
|
||||
|
||||
msgid "Export EDID"
|
||||
msgstr "Esporta EDID"
|
||||
|
||||
msgid "EDID file \"%ls\" is too large."
|
||||
msgstr "Il file EDID “%ls” è troppo grande."
|
||||
|
||||
@@ -2954,3 +2954,15 @@ msgstr "CGA複合モードの設定...(&C)"
|
||||
|
||||
msgid "CGA composite settings"
|
||||
msgstr "CGA複合モードの設定"
|
||||
|
||||
msgid "Monitor EDID"
|
||||
msgstr "モニターのEDID"
|
||||
|
||||
msgid "Export..."
|
||||
msgstr "エクスポート..."
|
||||
|
||||
msgid "Export EDID"
|
||||
msgstr "EDIDのエクスポート"
|
||||
|
||||
msgid "EDID file \"%ls\" is too large."
|
||||
msgstr "EDIDファイル「%ls」が大きすぎます。"
|
||||
|
||||
@@ -2954,3 +2954,15 @@ msgstr "CGA 복합 모드의 설정...(&C)"
|
||||
|
||||
msgid "CGA composite settings"
|
||||
msgstr "CGA 복합 모드의 설정"
|
||||
|
||||
msgid "Monitor EDID"
|
||||
msgstr "모니터의 EDID"
|
||||
|
||||
msgid "Export..."
|
||||
msgstr "수출..."
|
||||
|
||||
msgid "Export EDID"
|
||||
msgstr "EDID 내보내기"
|
||||
|
||||
msgid "EDID file \"%ls\" is too large."
|
||||
msgstr "EDID 파일 \"%ls\"가 너무 큽니다."
|
||||
|
||||
@@ -2954,3 +2954,15 @@ msgstr "&CGA-komposittinnstillinger..."
|
||||
|
||||
msgid "CGA composite settings"
|
||||
msgstr "CGA-komposittinnstillinger"
|
||||
|
||||
msgid "Monitor EDID"
|
||||
msgstr "EDID for skjerm"
|
||||
|
||||
msgid "Export..."
|
||||
msgstr "Eksporter..."
|
||||
|
||||
msgid "Export EDID"
|
||||
msgstr "Eksporter EDID"
|
||||
|
||||
msgid "EDID file \"%ls\" is too large."
|
||||
msgstr "EDID-filen «%ls» er for stor."
|
||||
|
||||
@@ -2954,3 +2954,15 @@ msgstr "Instellingen van de &CGA-compositemodus..."
|
||||
|
||||
msgid "CGA composite settings"
|
||||
msgstr "Instellingen van de CGA-compositemodus"
|
||||
|
||||
msgid "Monitor EDID"
|
||||
msgstr "EDID-monitor"
|
||||
|
||||
msgid "Export..."
|
||||
msgstr "Exporteren..."
|
||||
|
||||
msgid "Export EDID"
|
||||
msgstr "EDID exporteren"
|
||||
|
||||
msgid "EDID file \"%ls\" is too large."
|
||||
msgstr "Het EDID-bestand “%ls” is te groot."
|
||||
|
||||
@@ -2954,3 +2954,15 @@ msgstr "Ustawienia trybu kompozytowego &CGA..."
|
||||
|
||||
msgid "CGA composite settings"
|
||||
msgstr "Ustawienia trybu kompozytowego CGA"
|
||||
|
||||
msgid "Monitor EDID"
|
||||
msgstr "EDID monitora"
|
||||
|
||||
msgid "Export..."
|
||||
msgstr "Eksportuj..."
|
||||
|
||||
msgid "Export EDID"
|
||||
msgstr "Eksportuj EDID"
|
||||
|
||||
msgid "EDID file \"%ls\" is too large."
|
||||
msgstr "Plik EDID \"%ls\" jest zbyt duży."
|
||||
|
||||
@@ -2954,3 +2954,15 @@ msgstr "Configurações do modo composto &CGA..."
|
||||
|
||||
msgid "CGA composite settings"
|
||||
msgstr "Configurações do modo composto CGA"
|
||||
|
||||
msgid "Monitor EDID"
|
||||
msgstr "EDID do monitor"
|
||||
|
||||
msgid "Export..."
|
||||
msgstr "Exportar..."
|
||||
|
||||
msgid "Export EDID"
|
||||
msgstr "Exportar EDID"
|
||||
|
||||
msgid "EDID file \"%ls\" is too large."
|
||||
msgstr "O arquivo EDID \"%ls\" é muito grande."
|
||||
@@ -2954,3 +2954,15 @@ msgstr "Definições do modo compósito &CGA..."
|
||||
|
||||
msgid "CGA composite settings"
|
||||
msgstr "Definições do modo compósito CGA"
|
||||
|
||||
msgid "Monitor EDID"
|
||||
msgstr "EDID do monitor"
|
||||
|
||||
msgid "Export..."
|
||||
msgstr "Exportar..."
|
||||
|
||||
msgid "Export EDID"
|
||||
msgstr "Exportar EDID"
|
||||
|
||||
msgid "EDID file \"%ls\" is too large."
|
||||
msgstr "O ficheiro EDID \"%ls\" é demasiado grande."
|
||||
|
||||
@@ -2954,3 +2954,15 @@ msgstr "Настройки композитного видео &CGA..."
|
||||
|
||||
msgid "CGA composite settings"
|
||||
msgstr "Настройки композитного видео CGA"
|
||||
|
||||
msgid "Monitor EDID"
|
||||
msgstr "EDID монитора"
|
||||
|
||||
msgid "Export..."
|
||||
msgstr "Экспорт..."
|
||||
|
||||
msgid "Export EDID"
|
||||
msgstr "Экспорт EDID"
|
||||
|
||||
msgid "EDID file \"%ls\" is too large."
|
||||
msgstr "Файл EDID \"%ls\" слишком велик."
|
||||
|
||||
@@ -2954,3 +2954,15 @@ msgstr "Nastavenia kompozitného režimu &CGA..."
|
||||
|
||||
msgid "CGA composite settings"
|
||||
msgstr "Nastavenia kompozitného režimu CGA"
|
||||
|
||||
msgid "Monitor EDID"
|
||||
msgstr "EDID monitora"
|
||||
|
||||
msgid "Export..."
|
||||
msgstr "Exportovať..."
|
||||
|
||||
msgid "Export EDID"
|
||||
msgstr "Exportovať EDID"
|
||||
|
||||
msgid "EDID file \"%ls\" is too large."
|
||||
msgstr "Súbor EDID \"%ls\" je príliš veľký."
|
||||
|
||||
@@ -2954,3 +2954,15 @@ msgstr "Nastavitve kompozitnega načina &CGA..."
|
||||
|
||||
msgid "CGA composite settings"
|
||||
msgstr "Nastavitve kompozitnega načina CGA"
|
||||
|
||||
msgid "Monitor EDID"
|
||||
msgstr "EDID monitorja"
|
||||
|
||||
msgid "Export..."
|
||||
msgstr "Izvoz..."
|
||||
|
||||
msgid "Export EDID"
|
||||
msgstr "Izvoz EDID"
|
||||
|
||||
msgid "EDID file \"%ls\" is too large."
|
||||
msgstr "Datoteka EDID \"%ls\" je prevelika."
|
||||
|
||||
@@ -2954,3 +2954,15 @@ msgstr "Inställningar för &CGA-kompositläget..."
|
||||
|
||||
msgid "CGA composite settings"
|
||||
msgstr "Inställningar för CGA-kompositläget"
|
||||
|
||||
msgid "Monitor EDID"
|
||||
msgstr "EDID för bildskärm"
|
||||
|
||||
msgid "Export..."
|
||||
msgstr "Exportera..."
|
||||
|
||||
msgid "Export EDID"
|
||||
msgstr "Exportera EDID"
|
||||
|
||||
msgid "EDID file \"%ls\" is too large."
|
||||
msgstr "EDID-filen \"%ls\" är för stor."
|
||||
|
||||
@@ -2954,3 +2954,15 @@ msgstr "&CGA kompozit modunun ayarları..."
|
||||
|
||||
msgid "CGA composite settings"
|
||||
msgstr "CGA kompozit modunun ayarları"
|
||||
|
||||
msgid "Monitor EDID"
|
||||
msgstr "Monitörün EDID'si"
|
||||
|
||||
msgid "Export..."
|
||||
msgstr "Dışa aktar..."
|
||||
|
||||
msgid "Export EDID"
|
||||
msgstr "EDID'i dışa aktar"
|
||||
|
||||
msgid "EDID file \"%ls\" is too large."
|
||||
msgstr "EDID dosyası \"%ls\" çok büyük."
|
||||
|
||||
@@ -2954,3 +2954,15 @@ msgstr "Налаштування композитного відео &CGA..."
|
||||
|
||||
msgid "CGA composite settings"
|
||||
msgstr "Налаштування композитного відео CGA"
|
||||
|
||||
msgid "Monitor EDID"
|
||||
msgstr "EDID монітора"
|
||||
|
||||
msgid "Export..."
|
||||
msgstr "Експорт..."
|
||||
|
||||
msgid "Export EDID"
|
||||
msgstr "Експорт EDID"
|
||||
|
||||
msgid "EDID file \"%ls\" is too large."
|
||||
msgstr "Файл EDID \"%ls\" занадто великий."
|
||||
|
||||
@@ -2954,3 +2954,15 @@ msgstr "Cài đặt chế độ tổng hợp &CGA..."
|
||||
|
||||
msgid "CGA composite settings"
|
||||
msgstr "Cài đặt chế độ tổng hợp CGA"
|
||||
|
||||
msgid "Monitor EDID"
|
||||
msgstr "EDID của màn hình"
|
||||
|
||||
msgid "Export..."
|
||||
msgstr "Xuất khẩu..."
|
||||
|
||||
msgid "Export EDID"
|
||||
msgstr "Xuất khẩu EDID"
|
||||
|
||||
msgid "EDID file \"%ls\" is too large."
|
||||
msgstr "Tệp EDID \"%ls\" quá lớn."
|
||||
|
||||
@@ -2954,3 +2954,15 @@ msgstr "CGA 复合模式设置...(&C)"
|
||||
|
||||
msgid "CGA composite settings"
|
||||
msgstr "CGA 复合模式设置"
|
||||
|
||||
msgid "Monitor EDID"
|
||||
msgstr "显示器的EDID"
|
||||
|
||||
msgid "Export..."
|
||||
msgstr "导出..."
|
||||
|
||||
msgid "Export EDID"
|
||||
msgstr "导出EDID"
|
||||
|
||||
msgid "EDID file \"%ls\" is too large."
|
||||
msgstr "EDID文件\"%ls\"过大。"
|
||||
|
||||
@@ -2954,3 +2954,15 @@ msgstr "CGA 複合模式的設定...(&C)"
|
||||
|
||||
msgid "CGA composite settings"
|
||||
msgstr "CGA 複合模式的設定"
|
||||
|
||||
msgid "Monitor EDID"
|
||||
msgstr "監視器的 EDID"
|
||||
|
||||
msgid "Export..."
|
||||
msgstr "出口..."
|
||||
|
||||
msgid "Export EDID"
|
||||
msgstr "匯出 EDID"
|
||||
|
||||
msgid "EDID file \"%ls\" is too large."
|
||||
msgstr "EDID 檔案「%ls」太大。"
|
||||
|
||||
@@ -649,6 +649,7 @@ ProgSettings::reloadStrings()
|
||||
translatedstrings[STRING_NET_ERROR_DESC] = QCoreApplication::translate("", "The network configuration will be switched to the null driver").toStdWString();
|
||||
translatedstrings[STRING_ESCP_ERROR_TITLE] = QCoreApplication::translate("", "Unable to find Dot-Matrix fonts").toStdWString();
|
||||
translatedstrings[STRING_ESCP_ERROR_DESC] = QCoreApplication::translate("", "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer.").toStdWString();
|
||||
translatedstrings[STRING_EDID_TOO_LARGE] = QCoreApplication::translate("", "EDID file \"%ls\" is too large.").toStdWString();
|
||||
}
|
||||
|
||||
wchar_t *
|
||||
|
||||
@@ -77,7 +77,7 @@ SettingsDisplay::save()
|
||||
da2_standalone_enabled = ui->checkBoxDa2->isChecked() ? 1 : 0;
|
||||
monitor_edid = ui->radioButtonCustom->isChecked() ? 1 : 0;
|
||||
|
||||
strncpy(monitor_edid_path, ui->lineEdit->fileName().toUtf8(), sizeof(monitor_edid_path) - 1);
|
||||
strncpy(monitor_edid_path, ui->lineEdit->fileName().toUtf8().data(), sizeof(monitor_edid_path) - 1);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButtonCustom">
|
||||
<property name="text">
|
||||
<string>Custom</string>
|
||||
<string>Custom...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -234,7 +234,7 @@ void *
|
||||
ddc_init(void *i2c)
|
||||
{
|
||||
ssize_t edid_size = 0;
|
||||
void* edid_bytes = NULL;
|
||||
uint8_t* edid_bytes = NULL;
|
||||
if (monitor_edid == 1 && monitor_edid_path[0]) {
|
||||
FILE* file = plat_fopen(monitor_edid_path, "rb");
|
||||
|
||||
@@ -254,6 +254,16 @@ ddc_init(void *i2c)
|
||||
goto default_init;
|
||||
}
|
||||
|
||||
if (edid_size > 256) {
|
||||
wchar_t errmsg[2048] = { 0 };
|
||||
wchar_t path[2048] = { 0 };
|
||||
|
||||
mbstoc16s(path, monitor_edid_path, sizeof_w(path));
|
||||
swprintf(errmsg, sizeof_w(errmsg), plat_get_string(STRING_EDID_TOO_LARGE), path);
|
||||
fclose(file);
|
||||
goto default_init;
|
||||
}
|
||||
|
||||
edid_bytes = calloc(1, edid_size);
|
||||
if (!edid_bytes) {
|
||||
fclose(file);
|
||||
@@ -266,6 +276,30 @@ ddc_init(void *i2c)
|
||||
goto default_init;
|
||||
}
|
||||
|
||||
if (edid_size < 128) {
|
||||
edid_bytes = realloc(edid_bytes, 128);
|
||||
edid_size = 128;
|
||||
} else if (edid_size < 256) {
|
||||
edid_bytes = realloc(edid_bytes, 256);
|
||||
edid_size = 256;
|
||||
}
|
||||
|
||||
{
|
||||
int checksum = 0;
|
||||
for (uint8_t c = 0; c < 127; c++)
|
||||
checksum += edid_bytes[c];
|
||||
edid_bytes[127] = 256 - checksum;
|
||||
|
||||
if (edid_size == 256) {
|
||||
checksum = 0;
|
||||
|
||||
for (uint8_t c = 128; c < 255; c++) {
|
||||
checksum += edid_bytes[c];
|
||||
}
|
||||
edid_bytes[255] = 256 - checksum;
|
||||
}
|
||||
}
|
||||
|
||||
fclose(file);
|
||||
return i2c_eeprom_init(i2c, 0x50, edid_bytes, edid_size, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user