Skip to content

Commit 8a4dce4

Browse files
authored
repo sync
2 parents 84f0c7a + 598a3d9 commit 8a4dce4

File tree

13 files changed

+179
-156
lines changed

13 files changed

+179
-156
lines changed

.github/workflows/crowdin.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Please ping @github/docs-localization in the PR whenever you update this file!
2-
31
name: Crowdin Sync
42

53
on:
@@ -25,18 +23,20 @@ jobs:
2523

2624
# Using a custom config temporarily to avoid clobbering the existing crowdin.yml
2725
# that is used by the github-help-docs OAuth integration.
28-
config: 'crowdin-actions-config.yml'
26+
config: 'crowdin.yml'
2927

3028
# This is the name of the git branch that Crowdin will create when opening a pull request.
3129
# This branch does NOT need to be manually created. It will be created automatically by the action.
32-
localization_branch_name: automated-crowdin-translations
30+
localization_branch_name: translations
3331

3432
# This is the name of the top-level directory that Crowdin will use for files.
3533
# Note that this is not a "branch" in the git sense, but more like a top-level directory in your Crowdin project.
3634
# This branch does NOT need to be manually created. It will be created automatically by the action.
37-
crowdin_branch_name: crowdin-main
35+
crowdin_branch_name: main
3836

3937
env:
38+
# Using an @octoglot token instead of the default Actions-provided GITHUB_TOKEN here
39+
# so that subsequent workflows will be able to run on the pull request created by this workflow.
4040
GITHUB_TOKEN: ${{ secrets.OCTOGLOT_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
4141

4242
# This is a numeric id, not to be confused with Crowdin API v1 "project identifier" string

content/admin/enterprise-support/about-github-enterprise-support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ For urgent issues, we can help you in English 24 hours per day, 7 days per week,
5959

6060
{% data variables.contact.enterprise_support %} observes these U.S. holidays, although our global support team is available to answer urgent tickets.
6161

62-
| U.S. holiday | Date observed in {{ "now" | date: "%Y" }} |
62+
| U.S. holiday | Date observed |
6363
| --- | --- |
6464
| New Year's Day | January 1 |
6565
| Martin Luther King, Jr. Day | Third Monday in January |

crowdin-actions-config.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

crowdin.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,10 @@ files:
1616
"data/graphql",
1717
"data/products.yml"
1818
]
19+
20+
# These end up as env vars used by the GitHub Actions workflow
21+
project_id_env: CROWDIN_PROJECT_ID
22+
api_token_env: CROWDIN_PERSONAL_TOKEN
23+
24+
# https://support.crowdin.com/configuration-file-v3/#saving-directory-structure-on-server
25+
preserve_hierarchy: true

script/README.md

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ Runs tests. Equivalent of `npm test`.
3030

3131
## Additional scripts
3232

33+
### [`anonymize-branch.js`](anonymize-branch.js)
34+
35+
Flatten all the commits in the current branch into a single anonymized @Octomerger commit
36+
37+
Usage: script/anonymize-branch.js <new-commit-message> [base-branch] Example: script/anonymize-branch.js "nothing to see here" If the optional [base-branch] argument is omitted, it will default to `main`
38+
39+
---
40+
41+
3342
### [`archive-enterprise-version.js`](archive-enterprise-version.js)
3443

3544
Run this script during the Enterprise deprecation process to download static copies of all pages for the oldest supported Enterprise version. See the Enterprise deprecation issue template for instructions.
@@ -270,6 +279,19 @@ Usage $ script/new-versioning/main
270279
---
271280

272281

282+
### [`new-versioning/update-not-fpt-conditionals.js`](new-versioning/update-not-fpt-conditionals.js)
283+
284+
Run this script to update these Liquid conditionals:
285+
286+
{% if currentVersion != 'free-pro-team@latest' %}
287+
288+
to:
289+
290+
{% if enterpriseServerVersions contains currentVersion %}
291+
292+
---
293+
294+
273295
### [`new-versioning/update-products-yml.js`](new-versioning/update-products-yml.js)
274296

275297

@@ -307,15 +329,7 @@ This script is run as a git precommit hook (installed by husky after npm install
307329

308330
### [`preview-openapi-changes`](preview-openapi-changes)
309331

310-
This script stitches and unstitches the `github/github` OpenAPI description via `rest-api-operations` to produce a local preview in docs-internal.
311-
312-
`github`, `rest-api-operations`, and `docs-internal` must share a parent directory locally.
313-
314-
You must bootstrap `github` for this script to work. To check if you need to bootstrap, check if the `bin` directory in `github` exists locally. If it does not exist, run `./script/bootstrap` from the `github` directory.
315332

316-
To stitch the repos together and do an npm build, pass the `stitch` argument.
317-
318-
To unstitch the repos and revert them to their pre-stitched state, pass the `unstitch` argument.
319333

320334
---
321335

@@ -379,13 +393,19 @@ Run this script to remove reusables and image files that exist in the repo but a
379393

380394
This is a convenience script for replacing the contents of translated files with the English content from their corresponding source file.
381395

382-
It's intended to be a workaround to temporarily bypass Crowdin parser bugs while we wait for Crowdin to fix them.
396+
It's intended to be a workaround to temporarily bypass Crowdin parser bugs while we wait for translators to fix them.
397+
398+
Usage: script/reset-translated-file.js <filename>
399+
400+
Examples:
401+
402+
reset a single translated file using a relative path: $ script/reset-translated-file.js translations/es-XL/content/actions/index.md
383403

384-
Usage: script/reset-translated-File.js <relative-filename> [<two-letter-language-code>]
404+
reset a single translated file using a full path: $ script/reset-translated-file.js /Users/z/git/github/docs-internal/translations/es-XL/content/actions/index.md
385405

386-
script/reset-translated-File.js content/desktop/foo.md -> resets all translations of foo.md
406+
reset all language variants of a single English file (using a relative path): $ script/reset-translated-file.js content/actions/index.md $ script/reset-translated-file.js data/ui.yml
387407

388-
script/reset-translated-File.js content/desktop/foo.md de -> resets german translation of foo.md
408+
reset all language variants of a single English file (using a full path): $ script/reset-translated-file.js /Users/z/git/github/docs-internal/content/desktop/index.md $ script/reset-translated-file.js /Users/z/git/github/docs-internal/data/ui.yml
389409

390410
---
391411

script/reset-translated-file.js

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,26 @@
66
// files with the English content from their corresponding source file.
77
//
88
// It's intended to be a workaround to temporarily bypass Crowdin parser bugs
9-
// while we wait for Crowdin to fix them.
9+
// while we wait for translators to fix them.
1010
//
1111
// Usage:
12-
// script/reset-translated-File.js <relative-filename> [<two-letter-language-code>]
12+
// script/reset-translated-file.js <filename>
1313
//
14-
// script/reset-translated-File.js content/desktop/foo.md
15-
// -> resets all translations of foo.md
14+
// Examples:
1615
//
17-
// script/reset-translated-File.js content/desktop/foo.md de
18-
// -> resets german translation of foo.md
16+
// reset a single translated file using a relative path:
17+
// $ script/reset-translated-file.js translations/es-XL/content/actions/index.md
1918
//
19+
// reset a single translated file using a full path:
20+
// $ script/reset-translated-file.js /Users/z/git/github/docs-internal/translations/es-XL/content/actions/index.md
21+
//
22+
// reset all language variants of a single English file (using a relative path):
23+
// $ script/reset-translated-file.js content/actions/index.md
24+
// $ script/reset-translated-file.js data/ui.yml
25+
//
26+
// reset all language variants of a single English file (using a full path):
27+
// $ script/reset-translated-file.js /Users/z/git/github/docs-internal/content/desktop/index.md
28+
// $ script/reset-translated-file.js /Users/z/git/github/docs-internal/data/ui.yml
2029
//
2130
// [end-readme]
2231

@@ -25,8 +34,20 @@ const fs = require('fs')
2534
const path = require('path')
2635
const languages = require('../lib/languages')
2736

28-
const [relativePath, languageCode] = process.argv.slice(2)
29-
assert(relativePath, 'first arg must be a target filename')
37+
const [pathArg] = process.argv.slice(2)
38+
assert(pathArg, 'first arg must be a target filename')
39+
let languageCode
40+
41+
// Is the arg a fully-qualified path?
42+
let relativePath = fs.existsSync(pathArg)
43+
? path.relative(process.cwd(), pathArg)
44+
: pathArg
45+
46+
// extract relative path and language code if pathArg is in the format `translations/<lang>/path/to/file`
47+
if (relativePath.startsWith('translations/')) {
48+
languageCode = Object.values(languages).find(language => relativePath.startsWith(language.dir) && language.code !== 'en').code
49+
relativePath = relativePath.split(path.sep).slice(2).join(path.sep)
50+
}
3051

3152
const englishFile = path.join(process.cwd(), relativePath)
3253
assert(fs.existsSync(englishFile), `file does not exist: ${englishFile}`)

translations/de-DE/content/admin/enterprise-support/about-github-enterprise-support.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,21 @@ For urgent issues, we can help you in English 24 hours per day, 7 days per week,
5959

6060
{% data variables.contact.enterprise_support %} beobachtet diese Feiertage in den USA. dessen ungeachtet steht unser Support-Team zur Verfügung, um dringende Tickets zu beantworten.
6161

62-
| U.S. Weihnachtsfeiertag | Beobachtetes Datum | Datum in {{ "now:%Y" }} |
63-
| ----------------------- | ------------------------------ | ----------------------- |
64-
| Neujahr | 1. Januar | |
65-
| Martin Luther King Day | Dritter Montag im Januar | |
66-
| Presidents' Day | Dritter Montag im Februar | |
67-
| Memorial Day | Letzter Montag im Mai | |
68-
| Independence Day | 4. Juli | |
69-
| Labor Day | Erster Montag im September | |
70-
| Veterans Day | 12. November | |
71-
| Thanksgiving | Vierter Donnerstag im November | |
72-
| Tag nach Thanksgiving | Vierter Freitag im November | |
73-
| Heiligabend | 24. Dezember | |
74-
| 1. Weihnachtsfeiertag | 25. Dezember | |
75-
| 2. Weihnachtsfeiertag | 26. Dezember | |
76-
| Silvester | 31. Dezember | |
62+
| U.S. Weihnachtsfeiertag | Beobachtetes Datum |
63+
| ----------------------- | ------------------------------ |
64+
| Neujahr | 1. Januar |
65+
| Martin Luther King Day | Dritter Montag im Januar |
66+
| Presidents' Day | Dritter Montag im Februar |
67+
| Memorial Day | Letzter Montag im Mai |
68+
| Independence Day | 4. Juli |
69+
| Labor Day | Erster Montag im September |
70+
| Veterans Day | 12. November |
71+
| Thanksgiving | Vierter Donnerstag im November |
72+
| Tag nach Thanksgiving | Vierter Freitag im November |
73+
| Heiligabend | 24. Dezember |
74+
| 1. Weihnachtsfeiertag | 25. Dezember |
75+
| 2. Weihnachtsfeiertag | 26. Dezember |
76+
| Silvester | 31. Dezember |
7777

7878
#### Feiertage in Japan
7979

translations/es-XL/content/admin/enterprise-support/about-github-enterprise-support.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,21 @@ For urgent issues, we can help you in English 24 hours per day, 7 days per week,
5959

6060
{% data variables.contact.enterprise_support %} observa estos días festivos en Estados Unidos. {% data variables.contact.enterprise_support %} respeta estos días feriados en los EE.UU, aunque nuestro equipo de soporte global se encuentra disponible para atender tickets urgentes.
6161

62-
| U.S. holiday | Festejado en {{ "now" | date: "%Y" }} |
63-
| --------------------------------- | --------------------------- | ------------- |
64-
| Año Nuevo | 1 de enero | |
65-
| Día de Martin Luther King, Jr. | Tercer lunes de enero | |
66-
| Día de los Presidentes | Tercer lunes de febrero | |
67-
| Día de los Caídos | Último lunes de mayo | |
68-
| Día de la Independencia | 4 de julio | |
69-
| Día del Trabajo | Primer lunes de septiembre | |
70-
| Día de los Veteranos | 12 de noviembre | |
71-
| Día de Acción de Gracias | Cuarto jueves de noviembre | |
72-
| Día posterior a Acción de Gracias | Cuarto viernes de noviembre | |
73-
| Nochebuena | 24 de diciembre | |
74-
| Día de Navidad | 25 de diciembre | |
75-
| Día posterior a Navidad | 26 de diciembre | |
76-
| Víspera de Año Nuevo | 31 de diciembre | |
62+
| U.S. holiday | Festejado |
63+
| --------------------------------- | --------------------------- |
64+
| Año Nuevo | 1 de enero |
65+
| Día de Martin Luther King, Jr. | Tercer lunes de enero |
66+
| Día de los Presidentes | Tercer lunes de febrero |
67+
| Día de los Caídos | Último lunes de mayo |
68+
| Día de la Independencia | 4 de julio |
69+
| Día del Trabajo | Primer lunes de septiembre |
70+
| Día de los Veteranos | 12 de noviembre |
71+
| Día de Acción de Gracias | Cuarto jueves de noviembre |
72+
| Día posterior a Acción de Gracias | Cuarto viernes de noviembre |
73+
| Nochebuena | 24 de diciembre |
74+
| Día de Navidad | 25 de diciembre |
75+
| Día posterior a Navidad | 26 de diciembre |
76+
| Víspera de Año Nuevo | 31 de diciembre |
7777

7878
#### Feriados en Japón
7979

translations/ja-JP/content/admin/enterprise-support/about-github-enterprise-support.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,21 @@ versions:
5959

6060
{% data variables.contact.enterprise_support %} は、以下の米国の祝日を休日としています。 ただし、緊急サポートチケットにはグローバルサポートチームが対応しています。
6161

62-
| アメリカ合衆国の祝日 祝日 | Date observed in {{ "now" | 日付: "%Y" }} |
63-
| --------------------------- | --------------------------- | ----------- |
64-
| New Year's Day | January 1 | |
65-
| Martin Luther King, Jr. Day | Third Monday in January | |
66-
| Presidents' Day | Third Monday in February | |
67-
| Memorial Day | Last Monday in May | |
68-
| Independence Day | July 4 | |
69-
| Labor Day | First Monday in September | |
70-
| Veterans Day | November 12 | |
71-
| Thanksgiving Day | Fourth Thursday in November | |
72-
| Day after Thanksgiving | Fourth Friday in November | |
73-
| Christmas Eve | December 24 | |
74-
| Christmas Day | December 25 | |
75-
| Day after Christmas | December 26 | |
76-
| New Year's Eve | December 31 | |
62+
| アメリカ合衆国の祝日 祝日 | Date observed |
63+
| --------------------------- | --------------------------- |
64+
| New Year's Day | January 1 |
65+
| Martin Luther King, Jr. Day | Third Monday in January |
66+
| Presidents' Day | Third Monday in February |
67+
| Memorial Day | Last Monday in May |
68+
| Independence Day | July 4 |
69+
| Labor Day | First Monday in September |
70+
| Veterans Day | November 12 |
71+
| Thanksgiving Day | Fourth Thursday in November |
72+
| Day after Thanksgiving | Fourth Friday in November |
73+
| Christmas Eve | December 24 |
74+
| Christmas Day | December 25 |
75+
| Day after Christmas | December 26 |
76+
| New Year's Eve | December 31 |
7777

7878
#### 日本の祝日
7979

translations/ko-KR/content/admin/enterprise-support/about-github-enterprise-support.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,21 @@ For urgent issues, we can help you in English 24 hours per day, 7 days per week,
5959

6060
{% data variables.contact.enterprise_support %} observes these U.S. holidays, although our global support team is available to answer urgent tickets.
6161

62-
| U.S. holiday | Date observed in {{ "now" | date: "%Y" }} |
63-
| --------------------------- | --------------------------- | ------------- |
64-
| New Year's Day | January 1 | |
65-
| Martin Luther King, Jr. Day | Third Monday in January | |
66-
| Presidents' Day | Third Monday in February | |
67-
| Memorial Day | Last Monday in May | |
68-
| Independence Day | July 4 | |
69-
| Labor Day | First Monday in September | |
70-
| Veterans Day | November 12 | |
71-
| Thanksgiving Day | Fourth Thursday in November | |
72-
| Day after Thanksgiving | Fourth Friday in November | |
73-
| Christmas Eve | December 24 | |
74-
| Christmas Day | December 25 | |
75-
| Day after Christmas | December 26 | |
76-
| New Year's Eve | December 31 | |
62+
| U.S. holiday | Date observed |
63+
| --------------------------- | --------------------------- |
64+
| New Year's Day | January 1 |
65+
| Martin Luther King, Jr. Day | Third Monday in January |
66+
| Presidents' Day | Third Monday in February |
67+
| Memorial Day | Last Monday in May |
68+
| Independence Day | July 4 |
69+
| Labor Day | First Monday in September |
70+
| Veterans Day | November 12 |
71+
| Thanksgiving Day | Fourth Thursday in November |
72+
| Day after Thanksgiving | Fourth Friday in November |
73+
| Christmas Eve | December 24 |
74+
| Christmas Day | December 25 |
75+
| Day after Christmas | December 26 |
76+
| New Year's Eve | December 31 |
7777

7878
#### Holidays in Japan
7979

0 commit comments

Comments
 (0)