Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

i18n(folders): added files to respective language folders #3150

Closed

Conversation

AlphaLawless
Copy link

@AlphaLawless AlphaLawless commented Jan 11, 2023

Description

Adding folders to better organize translation content

Related Issues

There are no open issues, however a problem that could grow as more developers add support for other languages, it becomes a huge mess of .md files. I believe the solution would be to add folders of acronyms for each language to identify them.

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run npm run lint:js -- --fix and/or npm run lint:md -- --fix for my JavaScript and/or Markdown changes.
    • This is important as most of the cases your code changes might not be correctly linted
  • I have run npm run test to check if all tests are passing, and/or npm run test -- -u to update snapshots if I created and/or updated React Components.
  • I have checked that the build works locally and that npm run build work fine.
  • I've covered new added functionality with unit tests if necessary.

@codecov-commenter
Copy link

codecov-commenter commented Jan 11, 2023

Codecov Report

Base: 66.02% // Head: 66.39% // Increases project coverage by +0.36% 🎉

Coverage data is based on head (d7ffebf) compared to base (fd57b87).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3150      +/-   ##
==========================================
+ Coverage   66.02%   66.39%   +0.36%     
==========================================
  Files         118      145      +27     
  Lines        1351     1702     +351     
  Branches      342      393      +51     
==========================================
+ Hits          892     1130     +238     
- Misses        422      528     +106     
- Partials       37       44       +7     
Impacted Files Coverage Δ
src/templates/blog.tsx 0.00% <0.00%> (-100.00%) ⬇️
util-node/getNodeReleasesData.js 91.30% <0.00%> (-6.32%) ⬇️
src/__fixtures__/page.tsx 94.11% <0.00%> (-5.89%) ⬇️
src/pages/index.tsx 100.00% <0.00%> (ø)
src/templates/api.tsx 0.00% <0.00%> (ø)
src/templates/learn.tsx 100.00% <0.00%> (ø)
util-node/createSlug.js 100.00% <0.00%> (ø)
util-node/getNvmData.js 100.00% <0.00%> (ø)
src/hooks/useOnScreen.tsx 100.00% <0.00%> (ø)
src/pages/about/index.tsx 100.00% <0.00%> (ø)
... and 185 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@AugustinMauroy AugustinMauroy left a comment

Choose a reason for hiding this comment

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

I oppose this change. Because having the contents in the same directory allows a good maintenance. That is to say, if you update you can easily access the translated file.

And this does not respect the Gatsby file structure.

@ovflowd
Copy link
Member

ovflowd commented Jan 11, 2023

And this does not respect the Gatsby file structure.

It does. This change does not impact the current URLs/folder structure and how files are indexed/processed.

It could, of course, introduce issues with some of our custom route creation based on some file-name/file-path regexes that we have, so I'm not sure.

I'm okay with this change, but I highly doubt this will land, as we're freezing this repository for now to avoid non-necessary changes as we're going to migrate stuff from here to nodejs/nodejs.org

@AlphaLawless
Copy link
Author

I oppose this change. Because having the contents in the same directory allows a good maintenance. That is to say, if you update you can easily access the translated file.

And this does not respect the Gatsby file structure.

Currently, I don't see any issues with the file structure. However, over time, I believe support for 7 or more languages ​​becomes an issue - although it may stop at 7 languages.

Regarding Gatsby's file structure, the problem I saw was in content/learn, because inside /src/data/learn.yaml there are custom paths, so it ended up having problems reading the files. Therefore, it continues with the same structure.

@AlphaLawless
Copy link
Author

I'm okay with this change, but I highly doubt this will land, as we're freezing this repository for now to avoid non-necessary changes as we're going to migrate stuff from here to nodejs/nodejs.org

Don't worry, it's really a change that doesn't affect anything major. And since you're going to migrate, I don't see a problem with closing the PR.

@AlphaLawless
Copy link
Author

I'm closing the PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants