mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-09 18:40:14 +00:00
Merge branch 'localization' into 'master'
Post processing shaders localization See merge request OpenMW/openmw!2164
This commit is contained in:
commit
6a30897d63
@ -80,7 +80,10 @@ namespace fx
|
|||||||
|
|
||||||
void UniformBase::init(const std::shared_ptr<fx::Types::UniformBase>& uniform)
|
void UniformBase::init(const std::shared_ptr<fx::Types::UniformBase>& uniform)
|
||||||
{
|
{
|
||||||
mLabel->setCaption(uniform->mDisplayName.empty() ? uniform->mName : uniform->mDisplayName);
|
if (uniform->mDisplayName.empty())
|
||||||
|
mLabel->setCaption(uniform->mName);
|
||||||
|
else
|
||||||
|
mLabel->setCaptionWithReplacing(uniform->mDisplayName);
|
||||||
|
|
||||||
if (uniform->mDescription.empty())
|
if (uniform->mDescription.empty())
|
||||||
{
|
{
|
||||||
@ -163,4 +166,4 @@ namespace fx
|
|||||||
assignWidget(mClient, "Client");
|
assignWidget(mClient, "Client");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,12 +34,19 @@ of two ways:
|
|||||||
key by default. This is the recommended method as manual editing can be error
|
key by default. This is the recommended method as manual editing can be error
|
||||||
prone.
|
prone.
|
||||||
|
|
||||||
|
Localization
|
||||||
|
============
|
||||||
|
|
||||||
|
Output text (e.g. shader description) can use the ``#{ContextName:Key}`` tags.
|
||||||
|
In this case OpenMW replaces it for value of ``Key`` key from the
|
||||||
|
``Data Files\L10n\ContextName\used_language.yaml`` file.
|
||||||
|
|
||||||
Hot Reloading
|
Hot Reloading
|
||||||
==============
|
=============
|
||||||
|
|
||||||
It is possible to modify a shader without restarting OpenMW, :ref:`live reload`
|
It is possible to modify a shader without restarting OpenMW, :ref:`live reload`
|
||||||
must be enabled in ``settings.cfg``. Whenever a file is modified and saved, the
|
must be enabled in ``settings.cfg``. Whenever a file is modified and saved, the
|
||||||
shader will automatically reload in game. This allows shaders to be written in a
|
shader will automatically reload in game. This allows shaders to be written in a
|
||||||
text editor you are comfortable with. The only restriction is that new shaders
|
text editor you are comfortable with. The only restriction is that the VFS is not
|
||||||
cannot be added, as the VFS will not be rebuilt and OpenMW will not be aware of
|
aware of new files or changes in non-shader files, so new shaders and localization
|
||||||
the new file.
|
strings can not be used.
|
||||||
|
@ -20,6 +20,8 @@ set(BUILTIN_DATA_FILES
|
|||||||
fonts/Pelagiad.omwfont
|
fonts/Pelagiad.omwfont
|
||||||
fonts/PelagiadFontLicense.txt
|
fonts/PelagiadFontLicense.txt
|
||||||
|
|
||||||
|
l10n/BuiltInShaders/en.yaml
|
||||||
|
l10n/BuiltInShaders/ru.yaml
|
||||||
l10n/Calendar/en.yaml
|
l10n/Calendar/en.yaml
|
||||||
l10n/Calendar/ru.yaml
|
l10n/Calendar/ru.yaml
|
||||||
l10n/Calendar/sv.yaml
|
l10n/Calendar/sv.yaml
|
||||||
|
3
files/data/l10n/BuiltInShaders/en.yaml
Normal file
3
files/data/l10n/BuiltInShaders/en.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
DisplayDepthDescription: "Visualizes the depth buffer."
|
||||||
|
DisplayDepthFactorDescription: "Determines correlation between pixel depth value and its output color. High values lead to brighter image."
|
||||||
|
DisplayDepthFactorName: "Color factor"
|
3
files/data/l10n/BuiltInShaders/ru.yaml
Normal file
3
files/data/l10n/BuiltInShaders/ru.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
DisplayDepthDescription: "Визуализирует буфер глубины."
|
||||||
|
DisplayDepthFactorDescription: "Определяет соотношение между значением глубины пикселя и его цветом. Чем выше значение, тем ярче будет изображение."
|
||||||
|
DisplayDepthFactorName: "Соотношение цвета"
|
@ -1,7 +1,11 @@
|
|||||||
Abovewater: "Abovewater"
|
Abovewater: "Abovewater"
|
||||||
Author: "Author"
|
Author: "Author"
|
||||||
Configuration: "Configuration"
|
Configuration: "Configuration"
|
||||||
|
ContrastLevelDescription: "Constrast level"
|
||||||
|
ContrastLevelName: "Constrast"
|
||||||
Description: "Description"
|
Description: "Description"
|
||||||
|
GammaLevelDescription: "Gamma level"
|
||||||
|
GammaLevelName: "Gamma"
|
||||||
InExteriors: "Exteriors"
|
InExteriors: "Exteriors"
|
||||||
InInteriors: "Interiors"
|
InInteriors: "Interiors"
|
||||||
KeyboardControls: |
|
KeyboardControls: |
|
||||||
@ -11,6 +15,7 @@ KeyboardControls: |
|
|||||||
Shift+Left-Arrow > Deactive shader
|
Shift+Left-Arrow > Deactive shader
|
||||||
Shift+Up-Arrow > Move shader up
|
Shift+Up-Arrow > Move shader up
|
||||||
Shift+Down-Arrow > Move shader down
|
Shift+Down-Arrow > Move shader down
|
||||||
|
MainPassDescription: "Passes scene data to post processing shaders. Can not be toggled or moved."
|
||||||
PostProcessHUD: "Postprocess HUD"
|
PostProcessHUD: "Postprocess HUD"
|
||||||
ResetShader: "Reset shader to default state"
|
ResetShader: "Reset shader to default state"
|
||||||
ShaderLocked: "Locked"
|
ShaderLocked: "Locked"
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
Abovewater: "Над водой"
|
Abovewater: "Над водой"
|
||||||
Author: "Автор"
|
Author: "Автор"
|
||||||
Configuration: "Настройки"
|
Configuration: "Настройки"
|
||||||
|
ContrastLevelDescription: "Контрастность изображения"
|
||||||
|
ContrastLevelName: "Контрастность"
|
||||||
Description: "Описание"
|
Description: "Описание"
|
||||||
|
GammaLevelDescription: "Яркость изображения"
|
||||||
|
GammaLevelName: "Яркость"
|
||||||
InExteriors: "Вне помещений"
|
InExteriors: "Вне помещений"
|
||||||
InInteriors: "В помещениях"
|
InInteriors: "В помещениях"
|
||||||
KeyboardControls: |
|
KeyboardControls: |
|
||||||
@ -11,10 +15,11 @@ KeyboardControls: |
|
|||||||
Shift+Left-Arrow > Выключить шейдер
|
Shift+Left-Arrow > Выключить шейдер
|
||||||
Shift+Up-Arrow > Передвинуть шейдер выше
|
Shift+Up-Arrow > Передвинуть шейдер выше
|
||||||
Shift+Down-Arrow > Передвинуть шейдер ниже
|
Shift+Down-Arrow > Передвинуть шейдер ниже
|
||||||
|
MainPassDescription: "Передает данные сцены в шейдеры постобработки. Не может быть выключен или передвинут."
|
||||||
PostProcessHUD: "Настройки постобработки"
|
PostProcessHUD: "Настройки постобработки"
|
||||||
ResetShader: "Обнулить настройки этого шейдера"
|
ResetShader: "Обнулить настройки этого шейдера"
|
||||||
ShaderLocked: "Заблокирован"
|
ShaderLocked: "Заблокирован"
|
||||||
ShaderLockedDescription: "Не может быть выключен или перемещен, управляется внешним Lua-скриптом"
|
ShaderLockedDescription: "Не может быть выключен или передвинут, управляется внешним Lua-скриптом"
|
||||||
ShaderResetUniform: "x"
|
ShaderResetUniform: "x"
|
||||||
Underwater: "Под водой"
|
Underwater: "Под водой"
|
||||||
Version: "Версия"
|
Version: "Версия"
|
||||||
|
@ -3,6 +3,8 @@ uniform_float uFactor {
|
|||||||
min = 0.01;
|
min = 0.01;
|
||||||
max = 20.0;
|
max = 20.0;
|
||||||
default = 1.0;
|
default = 1.0;
|
||||||
|
display_name = "#{BuiltInShaders:DisplayDepthFactorName}";
|
||||||
|
description = "#{BuiltInShaders:DisplayDepthFactorDescription}";
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment main {
|
fragment main {
|
||||||
@ -20,7 +22,7 @@ fragment main {
|
|||||||
|
|
||||||
technique {
|
technique {
|
||||||
passes = main;
|
passes = main;
|
||||||
description = "Visualizes the depth buffer.";
|
description = "#{BuiltInShaders:DisplayDepthDescription}";
|
||||||
author = "OpenMW";
|
author = "OpenMW";
|
||||||
version = "1.0";
|
version = "1.0";
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,8 @@ uniform_float uGamma {
|
|||||||
step = 0.01;
|
step = 0.01;
|
||||||
min = 0.0;
|
min = 0.0;
|
||||||
max = 5.0;
|
max = 5.0;
|
||||||
description = "gamma level";
|
display_name = "#{PostProcessing:GammaLevelName}";
|
||||||
|
description = "#{PostProcessing:GammaLevelDescription}";
|
||||||
}
|
}
|
||||||
|
|
||||||
uniform_float uContrast {
|
uniform_float uContrast {
|
||||||
@ -19,7 +20,8 @@ uniform_float uContrast {
|
|||||||
step = 0.01;
|
step = 0.01;
|
||||||
min = 0.0;
|
min = 0.0;
|
||||||
max = 5.0;
|
max = 5.0;
|
||||||
description = "constrast level";
|
display_name = "#{PostProcessing:ContrastLevelName}";
|
||||||
|
description = "#{PostProcessing:ContrastLevelDescription}";
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment main {
|
fragment main {
|
||||||
@ -37,7 +39,7 @@ fragment main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
technique {
|
technique {
|
||||||
description = "Main pass.";
|
description = "#{PostProcessing:MainPassDescription}";
|
||||||
version = "1.0";
|
version = "1.0";
|
||||||
author = "OpenMW";
|
author = "OpenMW";
|
||||||
passes = main;
|
passes = main;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user