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

feat: allow customizing localization path of each locale #7624

Merged
merged 3 commits into from Jun 17, 2022

Conversation

Josh-Cena
Copy link
Collaborator

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

Continuation of #7386. Not sure how to test this, though...

Test Plan

Test links

Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/

Related issues/PRs

@Josh-Cena Josh-Cena added the pr: new feature This PR adds a new API or behavior. label Jun 16, 2022
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jun 16, 2022
@github-actions
Copy link

github-actions bot commented Jun 16, 2022

Size Change: +66 B (0%)

Total Size: 801 kB

Filename Size Change
website/build/assets/js/main.********.js 603 kB +66 B (0%)
ℹ️ View Unchanged
Filename Size
website/.docusaurus/globalData.json 52.6 kB
website/build/assets/css/styles.********.css 106 kB
website/build/index.html 38.9 kB

compressed-size-action

@netlify
Copy link

netlify bot commented Jun 16, 2022

[V2]

Name Link
🔨 Latest commit 5c02b12
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/62ac03ccabaf570009cffafd
😎 Deploy Preview https://deploy-preview-7624--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

github-actions bot commented Jun 16, 2022

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟠 84 🟢 100 🟢 100 🟢 100 🟢 90 Report
/docs/installation 🟠 84 🟢 100 🟢 100 🟢 100 🟢 90 Report

Copy link
Collaborator

@slorber slorber left a comment

Choose a reason for hiding this comment

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

LGTM 👍

That could be nice to add tests some basic "load()" tests that we currently don't have

I'm thinking of something simple like this?

import loadSetup from '../../server/__tests__/testUtils';

describe('load site', () => {
  it('simple', async () => {
    const props = await loadSetup('simple');
    expect(props).toMatchSnapshot()
  });

  it('custom', async () => {
    const props = await loadSetup('simple');
    expect(props).toMatchSnapshot()
  });

  it('i18n', async () => {
    const props = await loadSetup('i18n');
    expect(props).toMatchSnapshot()
  });
});

Also worth adding tests on the docs plugin, where you make a fixture use like i18n-custom/fr-custom or something?

website/docs/api/docusaurus.config.js.md Outdated Show resolved Hide resolved
@slorber
Copy link
Collaborator

slorber commented Jun 17, 2022

thanks 👍

@slorber slorber merged commit 1b9bec1 into main Jun 17, 2022
@slorber slorber deleted the jc/localization-path branch June 17, 2022 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: new feature This PR adds a new API or behavior.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants