Adding %{repository} instead of hardcoded GitHub repo in en.yml#1346
Open
kennethrioja wants to merge 1 commit into
Open
Adding %{repository} instead of hardcoded GitHub repo in en.yml#1346kennethrioja wants to merge 1 commit into
%{repository} instead of hardcoded GitHub repo in en.yml#1346kennethrioja wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes repository links in the developer-facing “license/contributions” strings configurable by introducing a %{repository} interpolation value, allowing the same TeSS instance to point at different upstream repositories without editing locale text.
Changes:
- Replaced hardcoded GitHub URLs in
config/locales/en.ymlwith%{repository}. - Added
repositoryto the global I18n default interpolation options viaconfig/initializers/i18n_defaults.rb.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| config/locales/en.yml | Switches LICENSE/CONTRIBUTING links to use %{repository} interpolation. |
| config/initializers/i18n_defaults.rb | Adds a default repository interpolation value sourced from TeSS::Config.site. |
Comments suppressed due to low confidence (1)
config/locales/en.yml:194
- The
<a>tag has an extra comma between attributes (href="...", target=...), which is invalid HTML and may be parsed inconsistently. Since this link opens a new tab, it should also includerel="noopener noreferrer"to prevent reverse-tabnabbing.
<a href="%{repository}/blob/master/CONTRIBUTING.md", target="_blank">contributions<i class="icon icon-md arrow-top-right-icon"></i></a>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| and widgets. The %{site_name} codebase is also available to re-use under the BSD Licence, and can be found on GitHub. | ||
| code_license: > | ||
| <a href="https://github.com/ElixirTeSS/TeSS/blob/master/LICENSE", target="_blank">BSD 3-Clause<i class="icon icon-md arrow-top-right-icon"></i></a> | ||
| <a href="%{repository}/blob/master/LICENSE", target="_blank">BSD 3-Clause<i class="icon icon-md arrow-top-right-icon"></i></a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes
%{repository}to not have a hardcoded URL inen.ymlMotivation and context
As I will now have different repos for HEP Training and EVERSE Training, I needed the URLs to be interchangeable easily.
Screenshots
N/A
Checklist