Skip to content

fix: Convert some absolute paths to relative 🌋#692

Merged
darcywong00 merged 18 commits intoepic/i18n-url-schemefrom
fix/relative-paths
Mar 26, 2026
Merged

fix: Convert some absolute paths to relative 🌋#692
darcywong00 merged 18 commits intoepic/i18n-url-schemefrom
fix/relative-paths

Conversation

@darcywong00
Copy link
Copy Markdown
Contributor

@darcywong00 darcywong00 commented Mar 24, 2026

Follows #691 for #687

Fixes some of the relative paths for upcoming i18n
* Fix relative path to autoload.php

  • Start converting absolute paths to relative

Leaving these absolute paths intact for now:

  • /keyboards - will need to fix .htaccess
  • _test/ pages
  • Redirects to SIL pages:
    • /donate
    • /privacy

link-checker will be broken for quite a while as there's a lot of refactoring todo

Test-bot: skip

@darcywong00 darcywong00 added this to the A19S25 milestone Mar 24, 2026
@darcywong00 darcywong00 requested a review from mcdurdin March 24, 2026 07:07
@keymanapp-test-bot
Copy link
Copy Markdown

User Test Results

Test specification and instructions

User tests are not required

Copy link
Copy Markdown
Member

@mcdurdin mcdurdin left a comment

Choose a reason for hiding this comment

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

So all the link changes look good to me, but can we use #694 to cleanup all the require_once references?

require_once('includes/playstore.php');

require_once __DIR__ . '/../_includes/autoload.php';
require_once __DIR__ . '/../../_includes/autoload.php';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we may be able to reduce the work on require_once changes with #694. Sorry if that doubles up on the edits you've already done...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yep, I'll merge that in to this branch to continue working.

Question: How do I handle links like in the menu?

<?= Menu::render_globe_dropdown("phone"); ?>
<div class="phone-menu-item">
<h3>Products</h3>
<ul>
<li><a href="/windows/">Keyman <?=$fields->stable_version?> for Windows</a></li>
<li><a href="/mac/">Keyman <?=$fields->stable_version?> for macOS</a></li>
<li><a href="/linux/">Keyman <?=$fields->stable_version?> for Linux</a></li>
<li><a href="/keymanweb/">KeymanWeb.com</a></li>
<li><a href="/iphone/">Keyman <?=$fields->stable_version?> for iPhone</a></li>
<li><a href="/ipad/">Keyman <?=$fields->stable_version?> for iPad</a></li>
<li><a href="/android/">Keyman <?=$fields->stable_version?> for Android</a></li>
<li><a href="/bookmarklet/">Keyman Bookmarklet</a></li>
</ul>

Some in the footer too (to /about/...)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we'll need to have them aware of the current locale. e.g.

<a href="/<?=$lang?>/windows">

Or something like that. But we should try and avoid doing that except for shared content like this.

Base automatically changed from feat/i18n-url-scheme to epic/i18n-url-scheme March 25, 2026 06:42
@keymanapp-test-bot keymanapp-test-bot bot changed the title fix: Convert some absolute paths to relative fix: Convert some absolute paths to relative 🌋 Mar 25, 2026
Comment on lines +63 to +64
<a href="../_content/about/"><img id="sil-logo" src="<?php echo ImageRandomizer::randomizer(); ?>" width="50%" alt='SIL' /></a>
<p>Created by <a href="../_content/about/">SIL Global</a></p>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we should not be referencing _content anywhere in links. These need the $lang variable embedded

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done with fallback to 'en'


<div id='footer-get-involved'>
<a href="/about/get-involved">Get involved</a>
<a href="../_content/about/get-involved">Get involved</a>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

here also

Co-authored-by: Marc Durdin <marc@durdin.net>
@darcywong00 darcywong00 merged commit 930a7da into epic/i18n-url-scheme Mar 26, 2026
4 of 5 checks passed
@darcywong00 darcywong00 deleted the fix/relative-paths branch March 26, 2026 07:46
@github-project-automation github-project-automation bot moved this from Todo to Done in Keyman Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants