Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use forward-slash (/) for path separator in translation files #14399

Merged
merged 1 commit into from Feb 23, 2024

Conversation

srifqi
Copy link
Member

@srifqi srifqi commented Feb 22, 2024

Goal of the PR
This PR aims to make file path separators (in *.tr files) uniform across platforms (/).

How does the PR work?
This PR adds string replacement by splitting the path (depends on OS) and joining it again using forward-slash (/). The lstrip (left trim) call is to make sure that there are no slashes at the beginning of file paths.

Does it resolve any reported issue?
This PR tries to fix #14089.

To do

This PR is Ready for Review.

How to test

  1. On Windows, run the script with -p flag for a mod with scripts inside folders.
  2. Check that the file path separators are forward-slash (/).
  3. Try step 1 to 2 on other platforms/operating systems.

The lstrip (left trim) call is to make sure that there are no slashes at the beginning of file paths.
@sfan5 sfan5 added Trivial The change is a trivial bug fix, documentation or maintenance change, as per the Git Guidelines One approval ✅ ◻️ labels Feb 23, 2024
@sfan5 sfan5 merged commit 87fa4de into minetest:master Feb 23, 2024
@srifqi srifqi deleted the tr_update_path_sep branch February 25, 2024 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix 🐛 PRs that fix a bug One approval ✅ ◻️ @ Startup / Config / Util @ Translation Trivial The change is a trivial bug fix, documentation or maintenance change, as per the Git Guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Translation script: running it with -p flag changes slashes orientation between Windows and Linux
2 participants