[wesnoth-commits] [wesnoth/wesnoth] 0c42cd: Enable translation mark validation by the schema (...
Celtic Minstrel
noreply at github.com
Tue Jun 15 04:00:07 UTC 2021
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: 0c42cdc03816567b7e6173aa425ce6cdd711da09
https://github.com/wesnoth/wesnoth/commit/0c42cdc03816567b7e6173aa425ce6cdd711da09
Author: Celtic Minstrel <CelticMinstrel at users.noreply.github.com>
Date: 2021-06-14 (Mon, 14 Jun 2021)
Changed paths:
M data/ai/micro_ais/scenarios/animals.cfg
M data/ai/micro_ais/scenarios/goto.cfg
M data/ai/micro_ais/scenarios/protect_unit.cfg
M data/ai/micro_ais/scenarios/wolves.cfg
M data/ai/scenarios/scenario-formula-recruitment.cfg
M data/ai/scenarios/scenario-formula.cfg
M data/ai/scenarios/scenario-high_xp_attack.cfg
M data/ai/scenarios/scenario-lua_ai.cfg
M data/ai/scenarios/scenario-lua_ai_old_syntax.cfg
M data/ai/scenarios/scenario-poisoning.cfg
M data/campaigns/Dead_Water/scenarios/04_Slavers.cfg
M data/campaigns/Descent_Into_Darkness/scenarios/07a_A_Small_Favor.cfg
M data/campaigns/Descent_Into_Darkness/utils/abilities.cfg
M data/campaigns/Heir_To_The_Throne/scenarios/17_Scepter_of_Fire.cfg
M data/campaigns/Northern_Rebirth/scenarios/05a_01_The_Pursuit.cfg
M data/campaigns/Sceptre_of_Fire/scenarios/4_Gathering_Materials.cfg
M data/campaigns/Son_Of_The_Black_Eye/scenarios/14_Back_Home.cfg
M data/core/help.cfg
M data/core/terrain.cfg
M data/gui/widget/window_borderless.cfg
M data/gui/window/addon_auth.cfg
M data/gui/window/addon_license_prompt.cfg
M data/gui/window/addon_manager.cfg
M data/gui/window/debug_clock.cfg
M data/gui/window/depcheck_confirm_change.cfg
M data/gui/window/editor_edit_side.cfg
M data/gui/window/editor_resize_map.cfg
M data/gui/window/game_version.cfg
M data/gui/window/gamestate_inspector.cfg
M data/gui/window/install_dependencies.cfg
M data/gui/window/loadscreen.cfg
M data/gui/window/lobby_main.cfg
M data/gui/window/mp_login.cfg
M data/gui/window/network_transmission.cfg
M data/gui/window/story_viewer.cfg
M data/gui/window/title_screen.cfg
M data/scenario-leaders.cfg
M data/scenario-movethrough.cfg
M data/scenario-story.cfg
M data/scenario-test.cfg
M data/schema/ai/_main.cfg
M data/schema/core/actionwml.cfg
M data/schema/core/addons.cfg
M data/schema/core/conditionalwml.cfg
M data/schema/core/config.cfg
M data/schema/core/mapgen/lua.cfg
M data/schema/core/themes.cfg
M data/schema/editor/groups.cfg
M data/schema/game_config.cfg
M data/schema/gui.cfg
M data/schema/macros.cfg
M data/schema/schema.cfg
M data/schema/types/basic.cfg
M data/schema/types/subst.cfg
M data/schema/units/modifications.cfg
M data/schema/units/single.cfg
M data/schema/units/types.cfg
M data/test/macros/wml_unit_test_macros.cfg
M data/test/maps/pathfind_1.cfg
M data/test/scenarios/ai/_main.cfg
M data/test/scenarios/characterize_pathfinding.cfg
M data/test/scenarios/events-test_filterable1.cfg
M data/test/scenarios/events-test_filterable2.cfg
M data/test/scenarios/feeding.cfg
M data/test/scenarios/filter_vision.cfg
M data/test/scenarios/has_ally.cfg
M data/test/scenarios/move_skip_sighted.cfg
M data/test/scenarios/sighted_events.cfg
M data/test/scenarios/simple_find_path.cfg
M data/test/scenarios/store_reachable_locations_vision.cfg
M data/test/scenarios/swarm_disables_upgrades_with_abilities_adjacent.cfg
M data/test/scenarios/swarm_disables_upgrades_with_abilities_adjacent_fail.cfg
M data/test/scenarios/swarm_disables_upgrades_with_abilities_adjacent_leadership.cfg
M data/test/scenarios/swarm_disables_upgrades_with_abilities_adjacent_leadership_fail.cfg
M data/test/scenarios/test_check_victory.cfg
M data/test/scenarios/test_create_side.cfg
M data/test/scenarios/test_grunt_tod_damage.cfg
M data/test/scenarios/test_max_menu_items.cfg
M data/test/scenarios/test_menu_items.cfg
M data/test/scenarios/test_move.cfg
M data/test/scenarios/test_movetype.cfg
M data/test/scenarios/test_terrain_mask.cfg
M data/themes/default.cfg
M data/themes/editor.cfg
M src/gui/dialogs/network_transmission.cpp
M src/serialization/parser.cpp
M src/serialization/schema/type.cpp
M src/serialization/schema/type.hpp
M src/serialization/schema_validator.cpp
M src/serialization/schema_validator.hpp
M src/serialization/validator.hpp
M src/theme.cpp
M src/wesnoth.cpp
M utils/CI/schema_validation.sh
Log Message:
-----------
Enable translation mark validation by the schema (#5800)
- The t_string type is now a schema built-in type and no longer attempts a regex match.
- You can also specify that non-t_string types may be optionally-translatable; this case supports a regex match on the string (but note that the translation mark is not part of the match).
- Error messages involving keys with very large values ( > 128 characters) will now truncate the value.
- To account for occasional cases where the schema is intentionally violated, the --validate command-line option now automatically defines the SCHEMA_VALIDATION preprocessor define.
A key validates as type t_string if one of the following is true:
- The key is not present
- The key has at least one segment with a translation mark
- The key is blank (an empty string)
Any type other than t_string is not allowed to be translatable by default, unless you specify allow_translatable=yes in the [type] tag.
An optionally-translatable string could also be defined as a union of t_string and some other type.
More information about the Commits
mailing list