Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Examples catalog#39

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
lucacasonato wants to merge2 commits intomain
base:main
Choose a base branch
Loading
fromcookbook
Open

Examples catalog#39

lucacasonato wants to merge2 commits intomainfromcookbook

Conversation

@lucacasonato
Copy link
Collaborator

@lucacasonatolucacasonato commentedMar 15, 2025
edited
Loading

This commit adds a catalog of examples of how to do various things with MessageFormat 2. It is still relatively empty, but I hope that we can start filling this up with some more things collectively.

The idea here is for searches like "doing X with messageformat 2" to end up somewhere useful.

The best way to build a catalog like this is to look at Google Search console, see what people are looking for with "message format 2" in the query, and then make sure that frequent queries have a dedicated page. That requires having some decent traffic first though, so we need to seed it with examples that we think will be useful first.

image
image

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pagesbot commentedMar 15, 2025
edited
Loading

Deploying mfv2 with  Cloudflare Pages  Cloudflare Pages

Latest commit:2c84abe
Status: ✅  Deploy successful!
Preview URL:https://b2da80d7.mfv2.pages.dev
Branch Preview URL:https://cookbook.mfv2.pages.dev

View logs

Copy link
Member

@aphillipsaphillips left a comment

Choose a reason for hiding this comment

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

incomplete review

Comment on lines +27 to +30
The denominator of the compact form is a power of 10. In US English, examples
are 1,000 (K), 1,000,000 (M), or 1,000,000,000 (B). In other locales, different
denominators may be used, which may not always be a power of 1000. In India, for
example, 1,00,000 (L) is used to represent 100,000.
Copy link
Member

Choose a reason for hiding this comment

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

Use better line breaks. Semantic line breaks makes it easier to suggest edits, etc.

The examples (expecially the lakh example) is unclear. Perhaps:

Suggested change
The denominator of the compact form is a power of 10. In US English, examples
are 1,000 (K), 1,000,000 (M), or 1,000,000,000 (B). In other locales, different
denominators may be used, which may not always be a power of 1000. In India, for
example, 1,00,000 (L) is used to represent 100,000.
For example, in US English (`en-US`) you might see:
-`100,000``100K`
-`1,000,000``1M`
-`1,000,000,000``1B`
Other locales have different rules or might use different default
denominators.
For example, English as used in India (`en-IN`) uses a different grouping strategy with units called "lakhs" and "crore":
-`1,00,000``1L`
-`10,00,000``10L`
-`1,00,00,00,000``100Cr`

Comment on lines +24 to +25
Compact notation is a way of expressing large numbers in a more concise form. It
is commonly used in financial and scientific applications.
Copy link
Member

Choose a reason for hiding this comment

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

I'm not so sure about scientific applications? Perhaps:

Suggested change
Compact notation is a way of expressing large numbers in a more concise form. It
is commonly used in financial and scientific applications.
Compact notation is a way of expressing large numbers in a more concise form.
This is useful for displaying numbers in environments with limited
screen display space.

@@ -0,0 +1,17 @@
---
title: Displaying percentages
Copy link
Member

Choose a reason for hiding this comment

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

This is currently not in the spec, but may be added soon. The concern is that we might add a separate function.

@aphillips
Copy link
Member

Cookbooks (like this PR) are anoutstanding idea.

one {{Je zde jeden prvek.}}
few {{Jsou zde {$count} prvky.}}
many {{Jsou zde {$count} prvků.}}
* {{Jsou zde {$count} prvků.}}

Choose a reason for hiding this comment

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

Should probably makeother vs* more clear, but maybe that's better suited to a more complex example with multiple selectors.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@aphillipsaphillipsaphillips left review comments

+1 more reviewer

@bearfriendbearfriendbearfriend left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@lucacasonato@aphillips@bearfriend

[8]ページ先頭

©2009-2025 Movatter.jp