From b4ab710b355bbb12ccc7e9bcae55a41dccd98859 Mon Sep 17 00:00:00 2001 From: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com> Date: Mon, 9 Oct 2023 21:32:15 +0400 Subject: [PATCH 1/2] add yarn lockfile section for contributors (#11769) Co-authored-by: Peer Richelsen --- CONTRIBUTING.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7b477aef5f..520107e0dc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -161,3 +161,48 @@ If you get errors, be sure to fix them before committing. - If your PR refers to or fixes an issue, be sure to add `refs #XXX` or `fixes #XXX` to the PR description. Replacing `XXX` with the respective issue number. See more about [Linking a pull request to an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue). - Be sure to fill the PR Template accordingly. - Review [App Contribution Guidelines](./packages/app-store/CONTRIBUTING.md) when building integrations + +## Guidelines for committing yarn lockfile + +Do not commit your `yarn.lock` unless you've made changes to the `package.json`. If you've already committed `yarn.lock` unintentionally, follow these steps to undo: + +If your last commit has the `yarn.lock` file alongside other files and you only wish to uncommit the `yarn.lock`: + ```bash + git checkout HEAD~1 yarn.lock + git commit -m "Revert yarn.lock changes" + ``` +If you've pushed the commit with the `yarn.lock`: + 1. Correct the commit locally using the above method. + 2. Carefully force push: + + ```bash + git push origin --force + ``` + +If `yarn.lock` was committed a while ago and there have been several commits since, you can use the following steps to revert just the `yarn.lock` changes without impacting the subsequent changes: + +1. **Checkout a Previous Version**: + - Find the commit hash before the `yarn.lock` was unintentionally committed. You can do this by viewing the Git log: + ```bash + git log yarn.lock + ``` + - Once you have identified the commit hash, use it to checkout the previous version of `yarn.lock`: + ```bash + git checkout yarn.lock + ``` + +2. **Commit the Reverted Version**: + - After checking out the previous version of the `yarn.lock`, commit this change: + ```bash + git commit -m "Revert yarn.lock to its state before unintended changes" + ``` + +3. **Proceed with Caution**: + - If you need to push this change, first pull the latest changes from your remote branch to ensure you're not overwriting other recent changes: + ```bash + git pull origin + ``` + - Then push the updated branch: + ```bash + git push origin + ``` From 6c8c3de87c08ae63d04b2b4bc1049bd35eac19fe Mon Sep 17 00:00:00 2001 From: Jannes Blobel <72493222+jannesblobel@users.noreply.github.com> Date: Mon, 9 Oct 2023 19:39:04 +0200 Subject: [PATCH 2/2] fix: update inlang project settings file (#11442) --- inlang.config.js | 25 ------------------------- project.inlang.json | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 25 deletions(-) delete mode 100644 inlang.config.js create mode 100644 project.inlang.json diff --git a/inlang.config.js b/inlang.config.js deleted file mode 100644 index d35efde470..0000000000 --- a/inlang.config.js +++ /dev/null @@ -1,25 +0,0 @@ -// see https://inlang.com/ -export async function defineConfig(env) { - const { default: i18nextPlugin } = await env.$import( - "https://cdn.jsdelivr.net/npm/@inlang/plugin-i18next@2/dist/index.js" - ); - - const { default: standardLintRules } = await env.$import( - "https://cdn.jsdelivr.net/npm/@inlang/plugin-standard-lint-rules@3/dist/index.js" - ); - - return { - referenceLanguage: "en", - plugins: [ - i18nextPlugin({ - pathPattern: "./apps/web/public/static/locales/{language}/common.json", - }), - standardLintRules({ - // deactivating identical pattern because of nested - // resources like "de-DE" and "de-AT" where "de-AT" - // contrains overwrites but the majority are identical patterns. - identicalPattern: "off", - }), - ], - }; -} diff --git a/project.inlang.json b/project.inlang.json new file mode 100644 index 0000000000..fefd597160 --- /dev/null +++ b/project.inlang.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://inlang.com/schema/project-settings", + "sourceLanguageTag": "en", + "languageTags": ["ar", "az", "bg", "ca", "cs", "da", "de", "el", "en", "es-419", "es", "eu", "fr", "he", "hr", "hu", "id", "it", "iw", "ja", "ko", "nl", "no", "pl", "pt-BR", "pt", "ro", "ru", "sk", "sr", "sv", "ta", "tr", "uk", "vi", "zh-CN", "zh-TW"], + "modules": [ + "https://cdn.jsdelivr.net/npm/@inlang/plugin-i18next@4/dist/index.js", + "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-empty-pattern@1/dist/index.js", + "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-identical-pattern@1/dist/index.js", + "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-without-source@1/dist/index.js", + "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-missing-translation@1/dist/index.js" + ], + "plugin.inlang.i18next": { + "pathPattern": "./apps/web/public/static/locales/{languageTag}/common.json" + }, + "plugin.inlang.standardLintRules": { + "identicalPattern": "off" + } +}