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-15595 Reserve strings "undefined", "undefine", and "auto" in LDML #3278

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sffc
Copy link
Member

@sffc sffc commented Sep 20, 2023

CLDR-15595

  • This PR completes the ticket.

This change describes all of LDML, so I wasn't sure exactly where to put it, so I made a spot for it in the top-level tr35.md.

@sffc sffc requested a review from macchiati September 20, 2023 20:51
@srl295 srl295 requested a review from a team September 21, 2023 17:12
Copy link
Member

@srl295 srl295 left a comment

Choose a reason for hiding this comment

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

Text LGTM but I think it's in the wrong place, put it under #Valid_Attribute_Values

@srl295
Copy link
Member

srl295 commented Sep 21, 2023

Also There Oughtta Be A Test™, under TestDtdData (for the DTD) and perhaps something else to verify that it doesn't show up in actual data.

@srl295 srl295 requested a review from a team September 25, 2023 17:08
@srl295
Copy link
Member

srl295 commented Oct 3, 2023

@sffc ping?

@sffc
Copy link
Member Author

sffc commented Oct 4, 2023

This seems like a tricky test to write. I need to figure out how to check the full set of identifiers.

@srl295
Copy link
Member

srl295 commented Oct 6, 2023

This seems like a tricky test to write. I need to figure out how to check the full set of identifiers.

see the DtdData class

@macchiati
Copy link
Member

macchiati commented Oct 8, 2023 via email

@macchiati
Copy link
Member

I made a quick program to do a test for that, but we would need to enhance the @match values further before it could be a useful test. (#3328)

So that should not stand in the way of this PR.

@@ -242,6 +242,14 @@ External specifications may also reference particular components of Unicode loca

> _Field X can contain any Unicode region subtag values as given in Unicode Technical Standard #35: Unicode Locale Data Markup Language (LDML), excluding grouping codes._

### <a name="String_Identifiers" href="#String_Identifiers">String Identifiers</a>

Unicode LDML specifies many enumerations of string identifiers, such as days of the week ("`mon"`, `"tue"`, …), units of measurement (`"meter"`, `"inch"`, …), and person name fields (`"title"`, `"given"`, …). For any such string enumeration, the following identifiers are reserved for use by implementations and will not be added as explicit entries into the enumeration by LDML:
Copy link
Member

Choose a reason for hiding this comment

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

I think "specifies many enumerations" is too vague to be normative.

One way to more completely specify it would be to restrict it to attribute values. That is, however, too broad, because attributes can be representing other information. Or maybe focus on the terms that can be in bcp47 subtags?

One way to make progress in v44 would be to explicitly list those enumerations that cannot contain these terms, and then in v45 work on a more general solution.

@srl295
Copy link
Member

srl295 commented Oct 9, 2023

I made a quick program to do a test for that, but we would need to enhance the @match values further before it could be a useful test. (#3328)

So that should not stand in the way of this PR.

So you have confirmed that the DTD doesn't currently use these terms?

Do we need to also check the data that there’s not some data element, such as a calendar or unit with <type name="undefine" … ?

I agree that if we're confident we're not already in violation of the requirement, this could proceed into the spec.

( i still think it should be located under #Valid_Attribute_Values though )

@macchiati
Copy link
Member

macchiati commented Oct 9, 2023 via email

@sffc
Copy link
Member Author

sffc commented Feb 14, 2025

Could @macchiati or @srl295 suggest a next step on this PR?

@srl295
Copy link
Member

srl295 commented Feb 14, 2025

Could @macchiati or @srl295 suggest a next step on this PR?

Recapping existing suggestions:

  1. I suggested that it should be moved to be a subsection of ### Valid Attribute Values

  2. In the absence of a general statement and enforcing test, @macchiati suggested that it would be better to make an explicit list of enumerations where the given list is not allowed.

    Perhaps something like this:

> Certain attributes have values which are reserved for use by implementations and will not be added as explicit entries.
>
> The reserved values are as follows:
> - undefined … ( explanation etc )
> - … 
> 
> The attributes where these will not be added are as follows:
>
> - `day type=`
> - `unit type=`
> -
  1. Validate that those values are not currently added.
  2. Follow-up issue to automate the above, and simplify the spec (perhaps by an annotation or other metadata).

@sffc
Copy link
Member Author

sffc commented Feb 14, 2025

In the absence of a general statement and enforcing test, @macchiati suggested that it would be better to make an explicit list of enumerations where the given list is not allowed.

It seems infeasible to produce and maintain this list.

I feel like a hand-wavy solution is okay for now, until we can write the general test?

@srl295
Copy link
Member

srl295 commented Feb 14, 2025

In the absence of a general statement and enforcing test, @macchiati suggested that it would be better to make an explicit list of enumerations where the given list is not allowed.

It seems infeasible to produce and maintain this list.

Is it? As I noted, there's the DtdData class which has full access to annotation metadata. And there's also an XML Schema form of the data.

There's even grep 'ATTLIST.*|' common/dtd/ldml.dtd | fgrep -v draft which produces a bunch of things with DTD enumerations. You could filter that to find items of interest.

edit also, adding a general test would obviate future maintenance.

I feel like a hand-wavy solution is okay for now, until we can write the general test?

A hand-wavy solution isn't appropriate for a spec. In a sense it's already hand wavy, you can implement to what's spec'ed now, and you have brought this up to CLDR-TC. So, you would likely not see the auto calendar added for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants