-
Notifications
You must be signed in to change notification settings - Fork 387
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
CLDR-16835 Non-TC locales and extended locales remain open longer #3795
Conversation
- 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
tools/cldr-apps/src/main/java/org/unicode/cldr/web/SurveyMain.java
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(); |
There was a problem hiding this comment.
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:
- methods/data specifically for DDL
- methods/data specifically for non-DDL
- 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?
There was a problem hiding this comment.
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".
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)
@btangmu does the basic structure seem OK given the API improvement comments? |
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. |
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 |
<span | ||
class="ddlException" | ||
v-if="ddlException" | ||
title="Note: As a non-TC DDL locale, this phase has been extended." |
There was a problem hiding this comment.
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?
tools/cldr-apps/src/main/java/org/unicode/cldr/web/SurveyAjax.java
Outdated
Show resolved
Hide resolved
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
we also have classes such as |
There was a problem hiding this 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...
I'm updating this per today's meeting. But, it should be reviewable as a delta. |
How about STPhase and CheckPhase, pending the merger Steven suggested?
SGTM
…On Tue, Jun 11, 2024 at 10:35 AM Tom Bishop ***@***.***> wrote:
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?
—
Reply to this email directly, view it on GitHub
<#3795 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACJLEMBFV4BSRZCWOQ7AMVDZG4YNPAVCNFSM6AAAAABJEP65ECVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRRGI4DKNJWGA>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
Ideally we'd merge the two together. The problem is that SurveyTool
distinguishes between READONLY and VETTING_CLOSED, whereas CheckCLDR
doesn't.
I think as far as CLDR is concerned, those would be treated like FINAL_TESTING.
If so, then we could introduce those values in CheckCLDR.Phase, and change
the call sites for CheckCLDR.Phase.FINAL_TESTING. It appears that there are
less than a dozen of those.
*if* (Phase.*FINAL_TESTING* == getPhase() || Phase.*BUILD* ==
getPhase()) {
setSkipTest(*false*); // ok
turns into
*if* (Phase.*FINAL_TESTING* == getPhase() || Phase.*BUILD* ==
getPhase() || Phase.READONLY == getPhase() | Phase.VETTING_CLOSED ==
getPhase()) {
We could make it even cleaner if we add two methods:
1. isPhase(Set<Phase> testAgainst)
2. isPhase(Phase... testAgainst)
That way someone could write:
*if* (isPhase(Phase.*FINAL_TESTING, *Phase.*BUILD, *Phase.READONLY,
Phase.VETTING_CLOSED)) {
and/or we add some static sets for the common cases.
It also appears that in many cases, the desired behavior is really to test
against whether the ST is open, so cleaner in that case to have:
*if* (!isPhase(Phase.*SUBMISSION, *Phase.*VETTING*)) {
…On Tue, Jun 11, 2024 at 2:38 PM Mark Davis Ⓤ ***@***.***> wrote:
> How about STPhase and CheckPhase, pending the merger Steven suggested?
SGTM
On Tue, Jun 11, 2024 at 10:35 AM Tom Bishop ***@***.***>
wrote:
> 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?
>
> —
> Reply to this email directly, view it on GitHub
> <#3795 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ACJLEMBFV4BSRZCWOQ7AMVDZG4YNPAVCNFSM6AAAAABJEP65ECVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRRGI4DKNJWGA>
> .
> You are receiving this because your review was requested.Message ID:
> ***@***.***>
>
|
- 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()
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." |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
- test needed to be updated
The ! is ok for now. (We can make it clearer later, not blocker for this.) |
I think you meant to comment on #3796 |
Yes, sorry for mixing the PR comments.
…On Wed, Jun 12, 2024 at 9:39 AM Steven R. Loomis ***@***.***> wrote:
The ! is ok for now. (We can make it clearer later, not blocker for this.)
I think you meant to comment on #3796
<#3796>
—
Reply to this email directly, view it on GitHub
<#3795 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACJLEMG2RPBFT3S3THUQ2MLZHB2TJAVCNFSM6AAAAABJEP65ECVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRTGQ3TONRUGQ>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
However, I can't speak to the js or vue changes. |
Will plan to merge after this current push. |
Thanks. Tom has reviewd. |
CLDR-16835
This PR completes the ticket.
New API
SubmissionLocales.isTcLocale()
and tests:root
is a TC localeTC_ORG_LOCALES
is a TC locale, such as, say,fr
.fr_CA
orfr_CM
csw
.a new config parameter:
CLDR_EXTENDED_PHASE
. This may NOT be set in main phase READONLY.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:
Example logfile entries: