Skip to content

fix(developer): transform slashes to backslashes in paths in Package Editor#14721

Merged
mcdurdin merged 1 commit intomasterfrom
fix/developer/14719-transform-slashes-loading-package
Sep 15, 2025
Merged

fix(developer): transform slashes to backslashes in paths in Package Editor#14721
mcdurdin merged 1 commit intomasterfrom
fix/developer/14719-transform-slashes-loading-package

Conversation

@mcdurdin
Copy link
Copy Markdown
Member

When loading package files generated by kmc or edited on non-Windows systems, the Package Editor will now convert any forward slashes in the path to backslashes. This is necessary because the path manipulation functions in Keyman Developer work only with backslashes.

Fixes: #14719
Build-bot: skip release:developer

User Testing

TEST_CLONE: Try to clone a local keyboard project in Keyman Developer, e.g. obolo_chwerty from the keyboard repository. Use the new keyboard project id my_cloned_keyboard. Verify that the cloned .kps file uses forward slashes in file paths, such as <Name>../build/my_cloned_keyboard.kmx</Name>. Open this package file in the package editor, and verify that the Keyboard ID matches my_cloned_keyboard, and that the package compiles successfully.

…Editor

When loading package files generated by kmc or edited on non-Windows
systems, the Package Editor will now convert any forward slashes in the
path to backslashes. This is necessary because the path manipulation
functions in Keyman Developer work only with backslashes.

Fixes: #14719
Build-bot: skip release:developer
@github-project-automation github-project-automation bot moved this to Todo in Keyman Sep 10, 2025
@keymanapp-test-bot keymanapp-test-bot bot added has-user-test user-test-required User tests have not been completed labels Sep 10, 2025
@keymanapp-test-bot
Copy link
Copy Markdown

keymanapp-test-bot bot commented Sep 10, 2025

@keymanapp-test-bot keymanapp-test-bot bot added this to the A19S11 milestone Sep 10, 2025
mcdurdin added a commit that referenced this pull request Sep 10, 2025
…Editor

When loading package files generated by kmc or edited on non-Windows
systems, the Package Editor will now convert any forward slashes in the
path to backslashes. This is necessary because the path manipulation
functions in Keyman Developer work only with backslashes.

Fixes: #14719
Build-bot: skip release:developer
Cherry-pick-of: #14721
Copy link
Copy Markdown
Contributor

@ermshiperete ermshiperete left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@darcywong00 darcywong00 modified the milestones: A19S11, A19S12 Sep 13, 2025
@Meng-Heng Meng-Heng self-assigned this Sep 15, 2025
@Meng-Heng
Copy link
Copy Markdown
Contributor

Meng-Heng commented Sep 15, 2025

Test Results

Windows 10 Bootcamp, Keyman Developer v19.0.116-alpha-test-14721
The results are as followed:

Prerequisites

  1. Fetch & Pull keyboards repo for latest
  • TEST_CLONE (PASSED):
  1. Open Keyman Developer > Go to Project > New Project > Clone local project
  2. Specified "Source project filename" to release/o/obolo_chwerty/obolo_chwerty.kpj and "New Project ID" as my_cloned_keyboard:
    image
  3. Compile my_cloned_keyboard.kmn successfully
  4. Compile my_cloned_keyboard.kps successfully
  5. Verified: ID is my_cloned_keyboard
    <Keyboard>
     <ID>my_cloned_keyboard</ID>
     <OSKFont>..\external\shared\fonts\noto\Latn\NotoSans-Regular.ttf</OSKFont>
     <DisplayFont>..\external\shared\fonts\noto\Latn\NotoSans-Regular.ttf</DisplayFont>
     <Languages>
       <Language ID="ann">Obolo (Andoni)</Language>
     </Languages>
    </Keyboard>
    
  6. Verified: All the paths use backward slashes in the Source tab of Keyman Developer. Once open in a different text editor, e.g. VS Code, the paths use forward slashes.
    <File>
      <Name>../build/my_cloned_keyboard.kvk</Name>
      ...
    <File> 
      <Name>../build/my_cloned_keyboard.kmx</Name>
    

@keymanapp-test-bot keymanapp-test-bot bot added user-test-failed and removed user-test-required User tests have not been completed user-test-failed labels Sep 15, 2025
@Meng-Heng Meng-Heng removed their assignment Sep 15, 2025
@mcdurdin mcdurdin merged commit 18e1070 into master Sep 15, 2025
9 checks passed
@mcdurdin mcdurdin deleted the fix/developer/14719-transform-slashes-loading-package branch September 15, 2025 08:31
@github-project-automation github-project-automation bot moved this from Todo to Done in Keyman Sep 15, 2025
@keyman-server
Copy link
Copy Markdown
Collaborator

Changes in this pull request will be available for download in Keyman version 19.0.119-alpha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

bug(developer): package editor can insert a malformed keyboard id reference into the .kps <Keyboard> element

5 participants