mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-22 00:41:33 +00:00
Move Morrowind-specific l10n files to a separate data dir; dehardcode a few GMST names.
This commit is contained in:
parent
58fdd687a8
commit
685f86f19e
16 changed files with 127 additions and 48 deletions
|
@ -169,8 +169,9 @@ namespace MWGui
|
||||||
if (type == checkButtonType)
|
if (type == checkButtonType)
|
||||||
{
|
{
|
||||||
std::string initialValue
|
std::string initialValue
|
||||||
= Settings::Manager::getBool(getSettingName(current), getSettingCategory(current)) ? "#{sOn}"
|
= Settings::Manager::getBool(getSettingName(current), getSettingCategory(current))
|
||||||
: "#{sOff}";
|
? "#{Interface:On}"
|
||||||
|
: "#{Interface:Off}";
|
||||||
current->castType<MyGUI::Button>()->setCaptionWithReplacing(initialValue);
|
current->castType<MyGUI::Button>()->setCaptionWithReplacing(initialValue);
|
||||||
if (init)
|
if (init)
|
||||||
current->eventMouseButtonClick += MyGUI::newDelegate(this, &SettingsWindow::onButtonToggled);
|
current->eventMouseButtonClick += MyGUI::newDelegate(this, &SettingsWindow::onButtonToggled);
|
||||||
|
@ -250,7 +251,7 @@ namespace MWGui
|
||||||
|
|
||||||
configureWidgets(mMainWidget, true);
|
configureWidgets(mMainWidget, true);
|
||||||
|
|
||||||
setTitle("#{sOptions}");
|
setTitle("#{OMWEngine:SettingsWindow}");
|
||||||
|
|
||||||
getWidget(mSettingsTab, "SettingsTab");
|
getWidget(mSettingsTab, "SettingsTab");
|
||||||
getWidget(mOkButton, "OkButton");
|
getWidget(mOkButton, "OkButton");
|
||||||
|
@ -415,7 +416,8 @@ namespace MWGui
|
||||||
mPrimaryLanguage->setIndexSelected(MyGUI::ITEM_NONE);
|
mPrimaryLanguage->setIndexSelected(MyGUI::ITEM_NONE);
|
||||||
|
|
||||||
mSecondaryLanguage->removeAllItems();
|
mSecondaryLanguage->removeAllItems();
|
||||||
mSecondaryLanguage->addItem(MyGUI::LanguageManager::getInstance().replaceTags("#{sNone}"), std::string());
|
mSecondaryLanguage->addItem(
|
||||||
|
MyGUI::LanguageManager::getInstance().replaceTags("#{Interface:None}"), std::string());
|
||||||
mSecondaryLanguage->setIndexSelected(0);
|
mSecondaryLanguage->setIndexSelected(0);
|
||||||
|
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
|
@ -456,7 +458,7 @@ namespace MWGui
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ConfirmationDialog* dialog = MWBase::Environment::get().getWindowManager()->getConfirmationDialog();
|
ConfirmationDialog* dialog = MWBase::Environment::get().getWindowManager()->getConfirmationDialog();
|
||||||
dialog->askForConfirmation("#{sNotifyMessage67}");
|
dialog->askForConfirmation("#{OMWEngine:ConfirmResolution}");
|
||||||
dialog->eventOkClicked.clear();
|
dialog->eventOkClicked.clear();
|
||||||
dialog->eventOkClicked += MyGUI::newDelegate(this, &SettingsWindow::onResolutionAccept);
|
dialog->eventOkClicked += MyGUI::newDelegate(this, &SettingsWindow::onResolutionAccept);
|
||||||
dialog->eventCancelClicked.clear();
|
dialog->eventCancelClicked.clear();
|
||||||
|
@ -535,7 +537,7 @@ namespace MWGui
|
||||||
_sender->setCaptionWithReplacing(_sender->getItemNameAt(_sender->getIndexSelected()));
|
_sender->setCaptionWithReplacing(_sender->getItemNameAt(_sender->getIndexSelected()));
|
||||||
|
|
||||||
MWBase::Environment::get().getWindowManager()->interactiveMessageBox(
|
MWBase::Environment::get().getWindowManager()->interactiveMessageBox(
|
||||||
"#{OMWEngine:ChangeRequiresRestart}", { "#{sOK}" }, true);
|
"#{OMWEngine:ChangeRequiresRestart}", { "#{Interface:OK}" }, true);
|
||||||
|
|
||||||
Settings::Manager::setString("lighting method", "Shaders", *_sender->getItemDataAt<std::string>(pos));
|
Settings::Manager::setString("lighting method", "Shaders", *_sender->getItemDataAt<std::string>(pos));
|
||||||
apply();
|
apply();
|
||||||
|
@ -549,7 +551,7 @@ namespace MWGui
|
||||||
_sender->setCaptionWithReplacing(_sender->getItemNameAt(_sender->getIndexSelected()));
|
_sender->setCaptionWithReplacing(_sender->getItemNameAt(_sender->getIndexSelected()));
|
||||||
|
|
||||||
MWBase::Environment::get().getWindowManager()->interactiveMessageBox(
|
MWBase::Environment::get().getWindowManager()->interactiveMessageBox(
|
||||||
"#{OMWEngine:ChangeRequiresRestart}", { "#{sOK}" }, true);
|
"#{OMWEngine:ChangeRequiresRestart}", { "#{Interface:OK}" }, true);
|
||||||
|
|
||||||
std::vector<std::string> currentLocales = Settings::Manager::getStringArray("preferred locales", "General");
|
std::vector<std::string> currentLocales = Settings::Manager::getStringArray("preferred locales", "General");
|
||||||
if (currentLocales.size() <= langPriority)
|
if (currentLocales.size() <= langPriority)
|
||||||
|
@ -611,7 +613,7 @@ namespace MWGui
|
||||||
|
|
||||||
void SettingsWindow::onLightsResetButtonClicked(MyGUI::Widget* _sender)
|
void SettingsWindow::onLightsResetButtonClicked(MyGUI::Widget* _sender)
|
||||||
{
|
{
|
||||||
std::vector<std::string> buttons = { "#{sYes}", "#{sNo}" };
|
std::vector<std::string> buttons = { "#{Interface:Yes}", "#{Interface:No}" };
|
||||||
MWBase::Environment::get().getWindowManager()->interactiveMessageBox(
|
MWBase::Environment::get().getWindowManager()->interactiveMessageBox(
|
||||||
"#{OMWEngine:LightingResetToDefaults}", buttons, true);
|
"#{OMWEngine:LightingResetToDefaults}", buttons, true);
|
||||||
int selectedButton = MWBase::Environment::get().getWindowManager()->readPressedButton();
|
int selectedButton = MWBase::Environment::get().getWindowManager()->readPressedButton();
|
||||||
|
@ -1014,9 +1016,9 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
int actionId = *_sender->getUserData<int>();
|
int actionId = *_sender->getUserData<int>();
|
||||||
|
|
||||||
_sender->castType<MyGUI::Button>()->setCaptionWithReplacing("#{sNone}");
|
_sender->castType<MyGUI::Button>()->setCaptionWithReplacing("#{Interface:None}");
|
||||||
|
|
||||||
MWBase::Environment::get().getWindowManager()->staticMessageBox("#{sControlsMenu3}");
|
MWBase::Environment::get().getWindowManager()->staticMessageBox("#{OMWEngine:RebindAction}");
|
||||||
MWBase::Environment::get().getWindowManager()->disallowMouse();
|
MWBase::Environment::get().getWindowManager()->disallowMouse();
|
||||||
|
|
||||||
MWBase::Environment::get().getInputManager()->enableDetectingBindingMode(actionId, mKeyboardMode);
|
MWBase::Environment::get().getInputManager()->enableDetectingBindingMode(actionId, mKeyboardMode);
|
||||||
|
@ -1034,7 +1036,7 @@ namespace MWGui
|
||||||
void SettingsWindow::onResetDefaultBindings(MyGUI::Widget* _sender)
|
void SettingsWindow::onResetDefaultBindings(MyGUI::Widget* _sender)
|
||||||
{
|
{
|
||||||
ConfirmationDialog* dialog = MWBase::Environment::get().getWindowManager()->getConfirmationDialog();
|
ConfirmationDialog* dialog = MWBase::Environment::get().getWindowManager()->getConfirmationDialog();
|
||||||
dialog->askForConfirmation("#{sNotifyMessage66}");
|
dialog->askForConfirmation("#{OMWEngine:ConfirmResetBindings}");
|
||||||
dialog->eventOkClicked.clear();
|
dialog->eventOkClicked.clear();
|
||||||
dialog->eventOkClicked += MyGUI::newDelegate(this, &SettingsWindow::onResetDefaultBindingsAccept);
|
dialog->eventOkClicked += MyGUI::newDelegate(this, &SettingsWindow::onResetDefaultBindingsAccept);
|
||||||
dialog->eventCancelClicked.clear();
|
dialog->eventCancelClicked.clear();
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
add_subdirectory(shaders)
|
add_subdirectory(shaders)
|
||||||
add_subdirectory(data)
|
add_subdirectory(data)
|
||||||
|
add_subdirectory(data-mw)
|
||||||
add_subdirectory(lua_api)
|
add_subdirectory(lua_api)
|
||||||
|
|
||||||
if (NOT DEFINED OPENMW_RESOURCES_ROOT)
|
if (NOT DEFINED OPENMW_RESOURCES_ROOT)
|
||||||
|
|
22
files/data-mw/CMakeLists.txt
Normal file
22
files/data-mw/CMakeLists.txt
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
if (NOT DEFINED OPENMW_RESOURCES_ROOT)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(BUILTIN_DATA_MW_FILES
|
||||||
|
# Month names and date formatting
|
||||||
|
l10n/Calendar/de.yaml
|
||||||
|
l10n/Calendar/en.yaml
|
||||||
|
l10n/Calendar/ru.yaml
|
||||||
|
l10n/Calendar/sv.yaml
|
||||||
|
l10n/Calendar/fr.yaml
|
||||||
|
|
||||||
|
# Generic UI messages that can be reused by mods
|
||||||
|
l10n/Interface/gmst.yaml
|
||||||
|
|
||||||
|
# L10n for OpenMW menus and non-game-specific messages
|
||||||
|
l10n/OMWEngine/gmst.yaml
|
||||||
|
)
|
||||||
|
|
||||||
|
foreach (f ${BUILTIN_DATA_MW_FILES})
|
||||||
|
copy_resource_file("${CMAKE_CURRENT_SOURCE_DIR}/${f}" "${OPENMW_RESOURCES_ROOT}" "resources/vfs-mw/${f}")
|
||||||
|
endforeach (f)
|
39
files/data-mw/l10n/Calendar/en.yaml
Normal file
39
files/data-mw/l10n/Calendar/en.yaml
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
# source: https://en.uesp.net/wiki/Lore:Calendar
|
||||||
|
|
||||||
|
month1: "Morning Star"
|
||||||
|
month2: "Sun's Dawn"
|
||||||
|
month3: "First Seed"
|
||||||
|
month4: "Rain's Hand"
|
||||||
|
month5: "Second Seed"
|
||||||
|
month6: "Midyear"
|
||||||
|
month7: "Sun's Height"
|
||||||
|
month8: "Last Seed"
|
||||||
|
month9: "Hearthfire"
|
||||||
|
month10: "Frostfall"
|
||||||
|
month11: "Sun's Dusk"
|
||||||
|
month12: "Evening Star"
|
||||||
|
|
||||||
|
# The variant of month names in the context "day X of month Y".
|
||||||
|
# In English it is the same, but some languages require a different form.
|
||||||
|
monthInGenitive1: "Morning Star"
|
||||||
|
monthInGenitive2: "Sun's Dawn"
|
||||||
|
monthInGenitive3: "First Seed"
|
||||||
|
monthInGenitive4: "Rain's Hand"
|
||||||
|
monthInGenitive5: "Second Seed"
|
||||||
|
monthInGenitive6: "Midyear"
|
||||||
|
monthInGenitive7: "Sun's Height"
|
||||||
|
monthInGenitive8: "Last Seed"
|
||||||
|
monthInGenitive9: "Hearthfire"
|
||||||
|
monthInGenitive10: "Frostfall"
|
||||||
|
monthInGenitive11: "Sun's Dusk"
|
||||||
|
monthInGenitive12: "Evening Star"
|
||||||
|
|
||||||
|
dateFormat: "day {day} of {monthInGenitive} {year}"
|
||||||
|
|
||||||
|
weekday1: "Sundas"
|
||||||
|
weekday2: "Morndas"
|
||||||
|
weekday3: "Tirdas"
|
||||||
|
weekday4: "Middas"
|
||||||
|
weekday5: "Turdas"
|
||||||
|
weekday6: "Fredas"
|
||||||
|
weekday7: "Loredas"
|
6
files/data-mw/l10n/Interface/gmst.yaml
Normal file
6
files/data-mw/l10n/Interface/gmst.yaml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
On: "sOn"
|
||||||
|
Off: "sOff"
|
||||||
|
None: "sNone"
|
||||||
|
OK: "sOK"
|
||||||
|
Yes: "sYes"
|
||||||
|
No: "sNo"
|
4
files/data-mw/l10n/OMWEngine/gmst.yaml
Normal file
4
files/data-mw/l10n/OMWEngine/gmst.yaml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
ConfirmResetBindings: "sNotifyMessage66"
|
||||||
|
ConfirmResolution: "sNotifyMessage67"
|
||||||
|
RebindAction: "sControlsMenu3"
|
||||||
|
SettingsWindow: "sOptions"
|
|
@ -22,11 +22,7 @@ set(BUILTIN_DATA_FILES
|
||||||
fonts/MysticCardsFontLicense.txt
|
fonts/MysticCardsFontLicense.txt
|
||||||
|
|
||||||
# Month names and date formatting
|
# Month names and date formatting
|
||||||
l10n/Calendar/de.yaml
|
|
||||||
l10n/Calendar/en.yaml
|
l10n/Calendar/en.yaml
|
||||||
l10n/Calendar/ru.yaml
|
|
||||||
l10n/Calendar/sv.yaml
|
|
||||||
l10n/Calendar/fr.yaml
|
|
||||||
|
|
||||||
# Generic UI messages that can be reused by mods
|
# Generic UI messages that can be reused by mods
|
||||||
l10n/Interface/de.yaml
|
l10n/Interface/de.yaml
|
||||||
|
|
|
@ -1,39 +1,37 @@
|
||||||
# source: https://en.uesp.net/wiki/Lore:Calendar
|
month1: "January"
|
||||||
|
month2: "February"
|
||||||
month1: "Morning Star"
|
month3: "March"
|
||||||
month2: "Sun's Dawn"
|
month4: "April"
|
||||||
month3: "First Seed"
|
month5: "May"
|
||||||
month4: "Rain's Hand"
|
month6: "June"
|
||||||
month5: "Second Seed"
|
month7: "July"
|
||||||
month6: "Midyear"
|
month8: "August"
|
||||||
month7: "Sun's Height"
|
month9: "September"
|
||||||
month8: "Last Seed"
|
month10: "October"
|
||||||
month9: "Hearthfire"
|
month11: "November"
|
||||||
month10: "Frostfall"
|
month12: "December"
|
||||||
month11: "Sun's Dusk"
|
|
||||||
month12: "Evening Star"
|
|
||||||
|
|
||||||
# The variant of month names in the context "day X of month Y".
|
# The variant of month names in the context "day X of month Y".
|
||||||
# In English it is the same, but some languages require a different form.
|
# In English it is the same, but some languages require a different form.
|
||||||
monthInGenitive1: "Morning Star"
|
monthInGenitive1: "January"
|
||||||
monthInGenitive2: "Sun's Dawn"
|
monthInGenitive2: "February"
|
||||||
monthInGenitive3: "First Seed"
|
monthInGenitive3: "March"
|
||||||
monthInGenitive4: "Rain's Hand"
|
monthInGenitive4: "April"
|
||||||
monthInGenitive5: "Second Seed"
|
monthInGenitive5: "May"
|
||||||
monthInGenitive6: "Midyear"
|
monthInGenitive6: "June"
|
||||||
monthInGenitive7: "Sun's Height"
|
monthInGenitive7: "July"
|
||||||
monthInGenitive8: "Last Seed"
|
monthInGenitive8: "August"
|
||||||
monthInGenitive9: "Hearthfire"
|
monthInGenitive9: "September"
|
||||||
monthInGenitive10: "Frostfall"
|
monthInGenitive10: "October"
|
||||||
monthInGenitive11: "Sun's Dusk"
|
monthInGenitive11: "November"
|
||||||
monthInGenitive12: "Evening Star"
|
monthInGenitive12: "December"
|
||||||
|
|
||||||
dateFormat: "day {day} of {monthInGenitive} {year}"
|
dateFormat: "day {day} of {monthInGenitive} {year}"
|
||||||
|
|
||||||
weekday1: "Sundas"
|
weekday1: "Sunday"
|
||||||
weekday2: "Morndas"
|
weekday2: "Monday"
|
||||||
weekday3: "Tirdas"
|
weekday3: "Tuesday"
|
||||||
weekday4: "Middas"
|
weekday4: "Wednesday"
|
||||||
weekday5: "Turdas"
|
weekday5: "Thursday"
|
||||||
weekday6: "Fredas"
|
weekday6: "Friday"
|
||||||
weekday7: "Loredas"
|
weekday7: "Saturday"
|
||||||
|
|
|
@ -16,3 +16,8 @@ No: "No"
|
||||||
NotAvailableShort: "N/A"
|
NotAvailableShort: "N/A"
|
||||||
Reset: "Reset"
|
Reset: "Reset"
|
||||||
Yes: "Yes"
|
Yes: "Yes"
|
||||||
|
On: "On"
|
||||||
|
Off: "Off"
|
||||||
|
None: "None"
|
||||||
|
OK: "OK"
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,8 @@ CameraSensitivity: "Camera Sensitivity"
|
||||||
CameraZoomIn: "Zoom Camera In"
|
CameraZoomIn: "Zoom Camera In"
|
||||||
CameraZoomOut: "Zoom Camera Out"
|
CameraZoomOut: "Zoom Camera Out"
|
||||||
ChangeRequiresRestart: "This change requires a restart to take effect."
|
ChangeRequiresRestart: "This change requires a restart to take effect."
|
||||||
|
ConfirmResetBindings: "Reset all controls to the default?"
|
||||||
|
ConfirmResolution: "New resolution will be applied immediately. Do you want to continue?"
|
||||||
Controller: "Controller"
|
Controller: "Controller"
|
||||||
FieldOfView: "Field of View"
|
FieldOfView: "Field of View"
|
||||||
FrameRateHint: "Hint: press F3 to show\nthe current frame rate."
|
FrameRateHint: "Hint: press F3 to show\nthe current frame rate."
|
||||||
|
@ -56,6 +58,7 @@ RainRippleDetail: "Rain ripple detail"
|
||||||
RainRippleDetailDense: "Dense"
|
RainRippleDetailDense: "Dense"
|
||||||
RainRippleDetailSimple: "Simple"
|
RainRippleDetailSimple: "Simple"
|
||||||
RainRippleDetailSparse: "Sparse"
|
RainRippleDetailSparse: "Sparse"
|
||||||
|
RebindAction: "Press a key or button to rebind this control."
|
||||||
ReflectionShaderDetail: "Reflection shader detail"
|
ReflectionShaderDetail: "Reflection shader detail"
|
||||||
ReflectionShaderDetailActors: "Actors"
|
ReflectionShaderDetailActors: "Actors"
|
||||||
ReflectionShaderDetailGroundcover: "Groundcover"
|
ReflectionShaderDetailGroundcover: "Groundcover"
|
||||||
|
@ -69,6 +72,7 @@ Scripts: "Scripts"
|
||||||
ScriptsDisabled: "Load a game to access script settings."
|
ScriptsDisabled: "Load a game to access script settings."
|
||||||
SecondaryLanguage: "Secondary Language"
|
SecondaryLanguage: "Secondary Language"
|
||||||
SecondaryLanguageTooltip: "Localization files for this language may be used if the primary language files lack the necessary lines."
|
SecondaryLanguageTooltip: "Localization files for this language may be used if the primary language files lack the necessary lines."
|
||||||
|
SettingsWindow: "Options"
|
||||||
TextureFiltering: "Texture Filtering"
|
TextureFiltering: "Texture Filtering"
|
||||||
TextureFilteringBilinear: "Bilinear"
|
TextureFilteringBilinear: "Bilinear"
|
||||||
TextureFilteringDisabled: "None"
|
TextureFilteringDisabled: "None"
|
||||||
|
|
|
@ -7,6 +7,7 @@ data-local="?userdata?data"
|
||||||
user-data="?userdata?"
|
user-data="?userdata?"
|
||||||
config="?userconfig?"
|
config="?userconfig?"
|
||||||
resources=${OPENMW_RESOURCE_FILES}
|
resources=${OPENMW_RESOURCE_FILES}
|
||||||
|
data=${OPENMW_RESOURCE_FILES}/vfs-mw
|
||||||
script-blacklist=Museum
|
script-blacklist=Museum
|
||||||
script-blacklist=MockChangeScript
|
script-blacklist=MockChangeScript
|
||||||
script-blacklist=doortestwarp
|
script-blacklist=doortestwarp
|
||||||
|
|
|
@ -7,6 +7,7 @@ data-local="?userdata?data"
|
||||||
user-data="?userdata?"
|
user-data="?userdata?"
|
||||||
config="?userconfig?"
|
config="?userconfig?"
|
||||||
resources=./resources
|
resources=./resources
|
||||||
|
data=./resources/vfs-mw
|
||||||
script-blacklist=Museum
|
script-blacklist=Museum
|
||||||
script-blacklist=MockChangeScript
|
script-blacklist=MockChangeScript
|
||||||
script-blacklist=doortestwarp
|
script-blacklist=doortestwarp
|
||||||
|
|
Loading…
Reference in a new issue