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

fix: rely on data.locale for permalink generation #198

Merged

Conversation

greatislander
Copy link
Contributor

eleventy-plugin-i18n-gettext sets two variables based on the locale directory within the enhance11tydata() method:

  • locale: language and country code, e.g. en-CA
  • lang: language code, e.g. en

This PR fixes an issue where a locale could not be matched because the search string was the short lang value (en) but the set of locales being searched was indexed using the full locale (en-CA`) value.

@greatislander greatislander self-assigned this Aug 4, 2023
@greatislander greatislander added the bug Something isn't working label Aug 4, 2023
@greatislander greatislander added this to the 2.3.1 milestone Aug 4, 2023
@greatislander greatislander enabled auto-merge (squash) August 4, 2023 15:31
@codecov
Copy link

codecov bot commented Aug 4, 2023

Codecov Report

Merging #198 (781dce7) into main (226dc6f) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #198   +/-   ##
=======================================
  Coverage   97.05%   97.05%           
=======================================
  Files          14       14           
  Lines         679      679           
=======================================
  Hits          659      659           
  Misses         20       20           
Files Changed Coverage Δ
src/utils/generate-permalink.js 100.00% <100.00%> (ø)

@greatislander greatislander merged commit b4ca4ff into fluid-project:main Aug 4, 2023
5 checks passed
@greatislander greatislander deleted the fix/permalink-variable branch August 4, 2023 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants