Skip to content

Commit dc61640

Browse files
chore: add inlang ide extension for i18n (calcom#9599)
* add: inlang for i18n * chore: format file * chore: re-add comments VSCode removed them for unknown reasons. --------- Co-authored-by: Peer Richelsen <[email protected]>
1 parent 3611082 commit dc61640

File tree

3 files changed

+34
-6
lines changed

3 files changed

+34
-6
lines changed

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"ban.spellright", // Spell check for docs
99
"stripe.vscode-stripe", // stripe VSCode extension
1010
"Prisma.prisma", // syntax|format|completion for prisma
11-
"rebornix.project-snippets" // Share useful snippets between collaborators
11+
"rebornix.project-snippets", // Share useful snippets between collaborators
12+
"inlang.vs-code-extension" // improved i18n DX
1213
]
1314
}

apps/web/public/static/locales/en/common.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1643,7 +1643,7 @@
16431643
"scheduler": "{Scheduler}",
16441644
"no_workflows": "No workflows",
16451645
"change_filter": "Change filter to see your personal and team workflows.",
1646-
"change_filter_common":"Change filter to see the results.",
1646+
"change_filter_common": "Change filter to see the results.",
16471647
"no_results_for_filter": "No results for the filter",
16481648
"recommended_next_steps": "Recommended next steps",
16491649
"create_a_managed_event": "Create a managed event type",
@@ -1834,8 +1834,8 @@
18341834
"open_dialog_with_element_click": "Open your Cal dialog when someone clicks an element.",
18351835
"need_help_embedding": "Need help? See our guides for embedding Cal on Wix, Squarespace, or WordPress, check our common questions, or explore advanced embed options.",
18361836
"book_my_cal": "Book my Cal",
1837-
"invite_as":"Invite as",
1838-
"form_updated_successfully":"Form updated successfully.",
1837+
"invite_as": "Invite as",
1838+
"form_updated_successfully": "Form updated successfully.",
18391839
"disable_attendees_confirmation_emails": "Disable default confirmation emails for attendees",
18401840
"disable_attendees_confirmation_emails_description": "At least one workflow is active on this event type that sends an email to the attendees when the event is booked.",
18411841
"disable_host_confirmation_emails": "Disable default confirmation emails for host",
@@ -1858,8 +1858,8 @@
18581858
"admin_username": "Administrator's username",
18591859
"organization_name": "Organization name",
18601860
"organization_url": "Organization URL",
1861-
"organization_verify_header" :"Verify your organization email",
1862-
"organization_verify_email_body":"Please use the code below to verify your email address to continue setting up your organization.",
1861+
"organization_verify_header": "Verify your organization email",
1862+
"organization_verify_email_body": "Please use the code below to verify your email address to continue setting up your organization.",
18631863
"additional_url_parameters": "Additional URL parameters",
18641864
"about_your_organization": "About your organization",
18651865
"about_your_organization_description": "Organizations are shared environments where you can create multiple teams with shared members, event types, apps, workflows and more.",

inlang.config.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
// see https://inlang.com/
3+
export async function defineConfig(env) {
4+
5+
const { default: i18nextPlugin } = await env.$import(
6+
"https://cdn.jsdelivr.net/npm/@inlang/plugin-i18next@2/dist/index.js",
7+
)
8+
9+
const { default: standardLintRules } = await env.$import(
10+
"https://cdn.jsdelivr.net/npm/@inlang/plugin-standard-lint-rules@3/dist/index.js",
11+
)
12+
13+
return {
14+
referenceLanguage: "en",
15+
plugins: [
16+
i18nextPlugin({
17+
pathPattern: "./apps/web/public/static/locales/{language}/common.json",
18+
}),
19+
standardLintRules({
20+
// deactivating identical pattern because of nested
21+
// resources like "de-DE" and "de-AT" where "de-AT"
22+
// contrains overwrites but the majority are identical patterns.
23+
identicalPattern: "off"
24+
}),
25+
],
26+
}
27+
}

0 commit comments

Comments
 (0)