You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adds the backend infrastructure to allow multilingual config
settings with different values per language, so that pages such as the
project description on the dashboard can be localized.
ConfigSetting now has a "Multilingual" boolean flag to determine if the
config setting should be localizable. If it is multilingual, a new
`getMultilingualSetting` method on the NDB_Config object can be used to
get the value for a particular language code.
Translated strings are stored in a new "ConfigI18n" table (the casing
follows the standard of the Config tables, not the language table for
internal consistency.) When a translated version does not exist, the
`getMultilingualSetting` function will fall back to the non-localized
getSetting value.
There is not currently a frontend infrastructure to populate ConfigI18n.
The values must be done on the backend.
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, Label, OrderNumber) VALUES ('dashboard', 'Settings that affect the appearance of the dashboard and its charts', 1, 0, 'Dashboard', 5);
91
-
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT'projectDescription', 'Description of the study displayed in main dashboard panel', 1, 0, 'textarea', ID, 'Project Description', 1FROM ConfigSettings WHERE Name="dashboard";
102
+
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber, Multilingual) SELECT'projectDescription', 'Description of the study displayed in main dashboard panel', 1, 0, 'textarea', ID, 'Project Description', 1, trueFROM ConfigSettings WHERE Name="dashboard";
92
103
INSERT INTO ConfigSettings (Name, Description, Visible, AllowMultiple, DataType, Parent, Label, OrderNumber) SELECT'recruitmentTarget', 'Target number of participants for the study', 1, 0, 'text', ID, 'Target number of participants', 2FROM ConfigSettings WHERE Name="dashboard";
0 commit comments