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-16835 Non-TC locales and extended locales remain open longer #3795

Merged
merged 10 commits into from
Jun 13, 2024

Conversation

srl295
Copy link
Member

@srl295 srl295 commented Jun 11, 2024

CLDR-16835

  • This PR completes the ticket.

  • New API SubmissionLocales.isTcLocale() and tests:

    • root is a TC locale
    • Anything listed in TC_ORG_LOCALES is a TC locale, such as, say, fr.
    • Any sublocale of a TC locale is a TC locale, such as, say, fr_CA or fr_CM
    • Anything else is NOT a TC locale, such as csw.
  • a new config parameter: CLDR_EXTENDED_PHASE. This may NOT be set in main phase READONLY.

    • This new phase only affects locales that are not TC locales, or are listed in the CLDR_EXTENDED_SUBMISSION list.
  • Internal API to get this phase, taking a CLDRLocale.

  • UI where the extended phase is shown with a notice, ONLY if it is different from the main phase. No UI change for other users or locales.

Note: The original ticket was to 'automatically' leave DDL open longer, but I have here opted for a 'two tier' approach, where there is an explicit second phase that's applied only to some locales. This way there might be fewer surprises and the TC can choose exactly what phase the extended locales are in rather than have it be computed.

ALLOW_MANY_COMMITS=true

See comments below for example screenshots.

Sample configuration files:

# cldr.properties
CLDR_PHASE=VETTING_CLOSED
CLDR_EXTENDED_PHASE=SUBMIT
CLDR_EXTENDED_SUBMISSION=gsw fr es

Example logfile entries:

Phase: Vetting Closed, CheckCLDR Phase: FINAL_TESTING, Extended Phase: Data Submission
CLDR_EXTENDED_SUBMISSION=gsw fr es

srl295 added 5 commits June 10, 2024 18:16
- add CLDR_DDL_PHASE configuration var
- add separate DDL phase, defaulting to CLDR_PHASE
- pass phase through to client
- add separate tc org parameter in the locales list
- includes test
- a TC locale includes those whose parents are TC locales.
- add notifier for locMap change
- add UI to show special phase for non-TC locales
- add UI to show special phase for non-TC locales
- back end changes supporting a separate ddl phase
@srl295 srl295 self-assigned this Jun 11, 2024
@srl295
Copy link
Member Author

srl295 commented Jun 11, 2024

In the examples below, the vetter has permissions for both csw (non-tc) and fr (tc)

Example: CLDR_PHASE=VETTING but CLDR_DDL_PHASE=SUBMIT

  • csw
image

The yellow highlight has a tooltip, "Note, as a non-TC (DDL) locale, the phase has been extended." Note the plusses and items being added.

  • fr
image

Note the phase is here VETTING and the plus is not available.

CLDR_PHASE=VETTING_CLOSED but CLDR_DDL_PHASE=SUBMIT

  • locale list
image

Shows as 'Vetting Closed', does NOT show fr but lists csw as clickable.

  • csw

Same as before.

image
  • fr
image

User is no longer able to vote. Forum remains open.

@srl295 srl295 marked this pull request as ready for review June 11, 2024 15:06
@srl295 srl295 mentioned this pull request Jun 11, 2024
1 task
tools/cldr-apps/js/src/views/MainHeader.vue Outdated Show resolved Hide resolved
* @returns the current phase for the locale. This is the preferred API.
*/
public static CheckCLDR.Phase getCPhase(CLDRLocale loc) {
return phase(loc).getCPhase();
Copy link
Member

Choose a reason for hiding this comment

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

"C" for "current" is a little cryptic; I didn't know what it stood for until I got here. How about getCurrentPhase? Or a name that clarifies this method is appropriate for both DDL and non-DDL locales?

It seems like a terminology is needed, distinguishing 3 categories:

  1. methods/data specifically for DDL
  2. methods/data specifically for non-DDL
  3. methods/data that apply to either DDL or non-DDL, depending on the specified locale

There's also the long-standing confusion between CheckCLDR.Phase and SurveyMain.Phase, which still makes my head spin. Of course, fixing that is out of the scope of this ticket, but as long as new methods are being named, it would SO helpful for the new methods/data to use a naming convention that distinguishes them -- maybe checkPhase vs stPhase?

Also, it seems error prone to have three public methods: phase(), phase(locale), and getCPhase(loc). If the no-argument phase() ignores the existence of DDL, what ensures that various modules are consistent in treating DDL differently from non-DDL?

Copy link
Member Author

Choose a reason for hiding this comment

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

it's not current, it's CheckCLDR. CheckCLDR added its own 'Phase' enum distinct from ST's, and they haven't been fully reconciled yet. It's the "long-standing confusion between CheckCLDR.Phase and SurveyMain.Phase".

Copy link
Member Author

Choose a reason for hiding this comment

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

I will work on making these more clearer and consistent. Perhaps phase() could be renamed to overallPhase() or something.

Copy link
Member

Choose a reason for hiding this comment

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

And that would need to be overallPhase(locale), right? Without the locale, it can't be overall. So ideally, phase() without a locale parameter might be private? currently it has about 14 callers (before this PR) (not counting jsp)

@srl295
Copy link
Member Author

srl295 commented Jun 11, 2024

@btangmu does the basic structure seem OK given the API improvement comments?

@macchiati
Copy link
Member

I'd suggest changing the ST Phase to be SPhase, and all api's accessing it to also be SPhase.

@srl295
Copy link
Member Author

srl295 commented Jun 11, 2024

I'd suggest changing the ST Phase to be SPhase, and all api's accessing it to also be SPhase.

Ideally we'd merge the two together. The problem is that SurveyTool distinguishes between READONLY and VETTING_CLOSED, whereas CheckCLDR doesn't.

@btangmu
Copy link
Member

btangmu commented Jun 11, 2024

I'll approve as a step in the right direction, assuming that DDL users will be better off with it even if it's not fully consistent yet... Have you investigated the callers of phase() without locale? I'm especially concerned that DDL vetters will get mixed results, such as not getting phase=SUBMIT behavior in all circumstances where they're supposed to

btangmu
btangmu previously approved these changes Jun 11, 2024
<span
class="ddlException"
v-if="ddlException"
title="Note: As a non-TC DDL locale, this phase has been extended."
Copy link
Member

Choose a reason for hiding this comment

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

ideally this title might include ddlPhase, since "extended" is vague -- extended to what?

@btangmu
Copy link
Member

btangmu commented Jun 11, 2024

I'd suggest changing the ST Phase to be SPhase, and all api's accessing it to also be SPhase.

The fact that I couldn't tell whether CPhase meant "current phase" or "CLDRCheck phase" points to a general problem with single-letter abbreviations. How about STPhase and CheckPhase, pending the merger Steven suggested?

- replaced phase() and getCPhase() with getSurveyPhase() and toCheckCLDRPhase() for more clarity
- renamed the non-locale calls to getOverallSurveyPhase(), and reviewed.

See also CLDR-8196 for merging SurveyTool.Phase and CheckCLDR.Phase
@srl295
Copy link
Member Author

srl295 commented Jun 11, 2024

I'd suggest changing the ST Phase to be SPhase, and all api's accessing it to also be SPhase.

The fact that I couldn't tell whether CPhase meant "current phase" or "CLDRCheck phase" points to a general problem with single-letter abbreviations. How about STPhase and CheckPhase, pending the merger Steven suggested?

we also have classes such as Level which are used in two different scopes. Anyway, I've updated the API calls for clarity.

btangmu
btangmu previously approved these changes Jun 11, 2024
Copy link
Member

@btangmu btangmu left a comment

Choose a reason for hiding this comment

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

it's not quite clear what "overall" means or contrasts with...

@srl295
Copy link
Member Author

srl295 commented Jun 11, 2024

it's not quite clear what "overall" means or contrasts with...

I'm updating this per today's meeting. But, it should be reviewable as a delta.

@macchiati
Copy link
Member

macchiati commented Jun 11, 2024 via email

@macchiati
Copy link
Member

macchiati commented Jun 11, 2024 via email

- formerly ddlPhase
- New configuration parameters:
    - CLDR_EXTENDED_PHASE - the phase for non-TC and for specific extended locales
    - CLDR_EXTENDED_SUBMISSION - a separated list of TC locales that are additionally given the extended phase.
- Renamed API functions to reflect names such as getExtendedPhase()
@srl295 srl295 changed the title CLDR-16835 Non-TC locales remain open longer CLDR-16835 Non-TC locales and extended locales remain open longer Jun 12, 2024
@srl295 srl295 requested a review from btangmu June 12, 2024 14:00
btangmu
btangmu previously approved these changes Jun 12, 2024
title="Note: As a non-TC DDL locale, this phase has been extended."
class="extendedException"
v-if="extendedException"
title="Note: This phase has been extended for this locale."
Copy link
Member

Choose a reason for hiding this comment

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

If TC locales are in Vetting mode, and DDL locales are still in Submission mode, then if a DDL locale is selected, will this show "Vetting (extended)" or "Submission (extended)"? I'm guessing the latter but not quite sure

Copy link
Member Author

Choose a reason for hiding this comment

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

The latter. And it doesn't have to be a DDL locale, it could be one on the extended list.

- code was still using TC locale instead of extended locale for the phase test
btangmu
btangmu previously approved these changes Jun 12, 2024
@macchiati
Copy link
Member

The ! is ok for now. (We can make it clearer later, not blocker for this.)

@srl295 srl295 requested a review from btangmu June 12, 2024 15:38
@srl295
Copy link
Member Author

srl295 commented Jun 12, 2024

The ! is ok for now. (We can make it clearer later, not blocker for this.)

I think you meant to comment on #3796

@macchiati
Copy link
Member

macchiati commented Jun 12, 2024 via email

Copy link
Member

@macchiati macchiati left a comment

Choose a reason for hiding this comment

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

LGTM

@macchiati
Copy link
Member

However, I can't speak to the js or vue changes.

@srl295
Copy link
Member Author

srl295 commented Jun 13, 2024

Will plan to merge after this current push.

@srl295
Copy link
Member Author

srl295 commented Jun 13, 2024

However, I can't speak to the js or vue changes.

Thanks. Tom has reviewd.

@srl295 srl295 merged commit 88b9689 into unicode-org:main Jun 13, 2024
11 checks passed
@srl295 srl295 deleted the cldr-16835/ddl-separate-phase branch June 13, 2024 16:13
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