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

CLDR-17566 pre-test github pages before merge to main, also fix some items #3868

Merged
merged 2 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ permissions:
id-token: write

on:
pull_request:
push:
branches:
- main
Expand Down Expand Up @@ -68,7 +69,7 @@ jobs:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v2
- name: Deploy to Smoketest
if: github.repository == 'unicode-org/cldr'
if: github.repository == 'unicode-org/cldr' && github.event_name == 'push'
shell: bash
env:
RSA_KEY_CCC: ${{ secrets.RSA_KEY_CCC }}
Expand All @@ -87,6 +88,7 @@ jobs:
echo "::endgroup::"
echo "Now go to https://cldr-smoke.unicode.org/spec/"$(basename ${GITHUB_REF_NAME})
deploy:
if: github.repository == 'unicode-org/cldr' && github.event_name == 'push'
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
Expand All @@ -96,8 +98,7 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

# only run one of these at a time
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# only run one deployment at once.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
29 changes: 20 additions & 9 deletions docs/site/development/development-process/design-proposals/xmb.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Examples:

\<!-- English: Uzbekistan -->

\<msg id='615EB568A2478EAF'
\<msg id='615EB568A2478EAF'

\>**Ouzbékistan**\</msg>

Expand Down Expand Up @@ -70,7 +70,7 @@ Examples:

### Placeholders

Replaces the placeholders ("{0}", "MMM", etc.) in patterns by variable names with examples. This is data-driven, using the file at [xmbPlaceholders.txt](http://unicode.org/cldr/trac/browser/trunk/tools/java/org/unicode/cldr/tool/xmbPlaceholders.txt).
Replaces the placeholders ("{0}", "MMM", etc.) in patterns by variable names with examples. This is data-driven, using the file at [xmbPlaceholders.txt](http://unicode.org/cldr/trac/browser/trunk/tools/java/org/unicode/cldr/tool/xmbPlaceholders.txt).

Format:

Expand All @@ -96,7 +96,7 @@ Format:

1. If the value is SKIP, then the path is skipped.
2. The description can have {0}-style variables in it. If so, then the (...) values in the path\_regex are substituted for them.
3. If the value starts with ROOT, then the path is skipped if the type\_value is not in ROOT, where the type\_value is from the first capture group. This is used to make sure that the type\_value is in the major coverage requirements for: language, script, territory, currency, timezone, and metazone. The description can have placeholders, as in case 21.
3. If the value starts with ROOT, then the path is skipped if the type\_value is not in ROOT, where the type\_value is from the first capture group. This is used to make sure that the type\_value is in the major coverage requirements for: language, script, territory, currency, timezone, and metazone. The description can have placeholders, as in case 21.

Example:

Expand All @@ -108,11 +108,19 @@ Example:

Plurals are represented with ICU Syntax, such as:

\<msg id='4AC13E2DA211C113' desc='[ICU Syntax] The pattern used to compose plural for week, including abbreviated forms. These forms are special! Before translating, see cldr.org/translation/plurals.'
<!--
{% raw %}

\>{LENGTH, select,
Disable liquid parsing on this codeblock to prevent errors reading '{{'
See: https://talk.jekyllrb.com/t/code-block-is-improperly-handled-and-generates-liquid-syntax-error/7599/2
-->

abbreviated {{NUMBER\_OF\_WEEKS, plural,
```xml
Copy link
Member Author

Choose a reason for hiding this comment

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

@chpy04 this wasn't needed but i decided to put this in an XML code fence.

The real fix is the {% raw… directive.

<msg id='4AC13E2DA211C113' desc='[ICU Syntax] The pattern used to compose plural for week, including abbreviated forms. These forms are special! Before translating, see cldr.org/translation/plurals.'>

{LENGTH, select,

abbreviated {{NUMBER_OF_WEEKS, plural,

=0 {0 wks}

Expand All @@ -130,7 +138,7 @@ many {# wks}

other {# wks}}}

other {{NUMBER\_OF\_WEEKS, plural,
other {{NUMBER_OF_WEEKS, plural,

=0 {0 weeks}

Expand All @@ -146,7 +154,10 @@ few {# weeks}

many {# weeks}

other {# weeks}}}}\</msg>
other {# weeks}}}}</msg>
```

<!-- {% endraw %} -->

### TODO

Expand All @@ -160,4 +171,4 @@ other {# weeks}}}}\</msg>
- Figure out how to do the differences between HH and hh, etc.
- Current thoughts: don't let the translator choose, but make it part of the xtb-cldr processing.

![Unicode copyright](https://www.unicode.org/img/hb_notice.gif)
![Unicode copyright](https://www.unicode.org/img/hb_notice.gif)
Loading