Skip to content

Adding %{repository} instead of hardcoded GitHub repo in en.yml#1346

Open
kennethrioja wants to merge 1 commit into
ElixirTeSS:masterfrom
kennethrioja:about-dev-githubrepo
Open

Adding %{repository} instead of hardcoded GitHub repo in en.yml#1346
kennethrioja wants to merge 1 commit into
ElixirTeSS:masterfrom
kennethrioja:about-dev-githubrepo

Conversation

@kennethrioja

Copy link
Copy Markdown
Contributor

Summary of changes

  • This is a quick one: I have created a %{repository} to not have a hardcoded URL in en.yml

Motivation 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

  • I have read and followed the CONTRIBUTING guide.
  • I confirm that I have the authority necessary to make this contribution on behalf of its copyright owner and agree to license it to the TeSS codebase under the BSD license.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.yml with %{repository}.
  • Added repository to the global I18n default interpolation options via config/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 include rel="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.

Comment thread config/locales/en.yml
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants