fix(windows): tweaks for strings.xml support

* Process setup strings also
* Remove legacy references to cust files from TIKE
* Add unit test to Makefile
This commit is contained in:
Marc Durdin 2021-01-25 13:41:56 +11:00
parent 4bc1730eed
commit 7c3bbeda15
7 changed files with 13 additions and 14 deletions

View file

@ -28,6 +28,8 @@ uses
System.TypInfo,
System.Variants,
Keyman.System.AndroidStringToKeymanLocaleString,
SetupStrings; // From Desktop/Setup
{ TBuildSetupStringTranslations }
@ -96,7 +98,7 @@ begin
begin
n := GetEnumValue(TypeInfo(TInstallInfoText), VarToStr(node.Attributes['name']));
if (n >= Ord(Low(TInstallInfoText))) and (n <= Ord(High(TInstallInfoText))) then
strings.Add(TInstallInfoText(n), PascalifyString(VarToStr(node.NodeValue)));
strings.Add(TInstallInfoText(n), PascalifyString(TAndroidStringToKeymanLocaleString.Transform(VarToStr(node.NodeValue))));
end;
node := node.NextSibling;
end;

View file

@ -24,7 +24,8 @@ uses
SourceRootPath in 'SourceRootPath.pas',
Keyman.System.DevTools.BuildMessageConstants in 'Keyman.System.DevTools.BuildMessageConstants.pas',
Keyman.System.DevTools.BuildSetupStringTranslations in 'Keyman.System.DevTools.BuildSetupStringTranslations.pas',
SetupStrings in '..\..\desktop\setup\SetupStrings.pas';
SetupStrings in '..\..\desktop\setup\SetupStrings.pas',
Keyman.System.AndroidStringToKeymanLocaleString in '..\..\global\delphi\general\Keyman.System.AndroidStringToKeymanLocaleString.pas';
begin
try

View file

@ -108,6 +108,7 @@
<DCCReference Include="Keyman.System.DevTools.BuildMessageConstants.pas"/>
<DCCReference Include="Keyman.System.DevTools.BuildSetupStringTranslations.pas"/>
<DCCReference Include="..\..\desktop\setup\SetupStrings.pas"/>
<DCCReference Include="..\..\global\delphi\general\Keyman.System.AndroidStringToKeymanLocaleString.pas"/>
<BuildConfiguration Include="Release">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>

View file

@ -87,10 +87,7 @@ uses
kpsfile in '..\..\global\delphi\general\kpsfile.pas',
Keyman.UI.UframeCEFHost in '..\..\global\delphi\chromium\Keyman.UI.UframeCEFHost.pas' {frameCEFHost},
UnitDrawArrow in '..\..\global\delphi\general\UnitDrawArrow.pas',
CustomisationStorage in '..\..\global\delphi\cust\CustomisationStorage.pas',
klog in '..\..\global\delphi\general\klog.pas',
custinterfaces in '..\..\global\delphi\cust\custinterfaces.pas',
CustomisationMessages in '..\..\global\delphi\cust\CustomisationMessages.pas',
HeadingCheckListBox in '..\..\global\delphi\comp\HeadingCheckListBox.pas',
BitmapEditor in '..\..\global\delphi\comp\BitmapEditor.pas',
StringGridEditControlled in '..\..\global\delphi\comp\StringGridEditControlled.pas',
@ -100,7 +97,6 @@ uses
utilsystem in '..\..\global\delphi\general\utilsystem.pas',
utilfiletypes in '..\..\global\delphi\general\utilfiletypes.pas',
UfrmNewFileDetails in 'dialogs\UfrmNewFileDetails.pas' {frmNewFileDetails},
CustomisationMenu in '..\..\global\delphi\cust\CustomisationMenu.pas',
StockFileNames in '..\..\global\delphi\cust\StockFileNames.pas',
CompileKeymanWeb in 'compile\CompileKeymanWeb.pas',
KeymanWebKeyCodes in 'compile\KeymanWebKeyCodes.pas',
@ -188,8 +184,7 @@ uses
CaptionPanel in '..\..\global\delphi\comp\CaptionPanel.pas',
Glossary in '..\..\global\delphi\general\Glossary.pas',
UframeTouchLayoutBuilder in 'oskbuilder\UframeTouchLayoutBuilder.pas' {frameTouchLayoutBuilder},
TouchLayoutUtils in 'oskbuilder\TouchLayoutUtils.pas' {,
UfrmSelectTouchLayoutTemplate in 'oskbuilder\UfrmSelectTouchLayoutTemplate.pas' {frmSelectTouchLayoutTemplate},
TouchLayoutUtils in 'oskbuilder\TouchLayoutUtils.pas',
UfrmSelectTouchLayoutTemplate in 'oskbuilder\UfrmSelectTouchLayoutTemplate.pas' {frmSelectTouchLayoutTemplate},
OnScreenKeyboardData in '..\..\global\delphi\visualkeyboard\OnScreenKeyboardData.pas',
TouchLayout in 'oskbuilder\TouchLayout.pas',

View file

@ -226,10 +226,7 @@
<Form>frameCEFHost</Form>
</DCCReference>
<DCCReference Include="..\..\global\delphi\general\UnitDrawArrow.pas"/>
<DCCReference Include="..\..\global\delphi\cust\CustomisationStorage.pas"/>
<DCCReference Include="..\..\global\delphi\general\klog.pas"/>
<DCCReference Include="..\..\global\delphi\cust\custinterfaces.pas"/>
<DCCReference Include="..\..\global\delphi\cust\CustomisationMessages.pas"/>
<DCCReference Include="..\..\global\delphi\comp\HeadingCheckListBox.pas"/>
<DCCReference Include="..\..\global\delphi\comp\BitmapEditor.pas"/>
<DCCReference Include="..\..\global\delphi\comp\StringGridEditControlled.pas"/>
@ -241,7 +238,6 @@
<DCCReference Include="dialogs\UfrmNewFileDetails.pas">
<Form>frmNewFileDetails</Form>
</DCCReference>
<DCCReference Include="..\..\global\delphi\cust\CustomisationMenu.pas"/>
<DCCReference Include="..\..\global\delphi\cust\StockFileNames.pas"/>
<DCCReference Include="compile\CompileKeymanWeb.pas"/>
<DCCReference Include="compile\KeymanWebKeyCodes.pas"/>

View file

@ -119,7 +119,6 @@ uses
CharMapDropTool,
ClipBrd,
CompileKeymanWeb,
CustomisationStorage,
dmActionsMain,
dmActionsTextEditor,
keymanstrings,

View file

@ -4,7 +4,8 @@
# ----------------------------------------------------------------------
TARGETS=group-helper-rsp19902 kmcomp shared-data lexical-model-compiler kmcomp-x64-structures
TARGETS=group-helper-rsp19902 kmcomp shared-data lexical-model-compiler kmcomp-x64-structures \
androidstringtokeymanlocalestring
test:
$(MAKE) -DTARGET=test $(TARGETS)
@ -13,6 +14,10 @@ test:
# ----------------------------------------------------------------------
androidstringtokeymanlocalestring:
cd $(ROOT)\src\test\unit-tests\androidstringtokeymanlocalestring
$(MAKE) $(TARGET)
group-helper-rsp19902:
cd $(ROOT)\src\test\unit-tests\group-helper-rsp19902
$(MAKE) $(TARGET)