[Unicode]   Common Locale Data Repository : Bug Tracking Home | Site Map | Search
 
Modify

CLDR Ticket #11133(closed: fixed)

Opened 7 months ago

Last modified 2 months ago

Import old votes ignores vote on Inheritance as Winning votes

Reported by: kristi Owned by: tbishop
Component: surveytool-other Data Locale:
Phase: dsub Review: srl
Weeks: Data Xpath:
Xref:

Description

It looks to me like the Votes on Inheritance get ignored in the Automatic import.
See screenshot comparing the Winning values and the list on user's Losing votes.

Attachments

Inherited votes get considered as losing.jpg (148.9 KB) - added by kristi 7 months ago.

Change History

Changed 7 months ago by kristi

comment:1 Changed 7 months ago by chiara

Same behavior noticed for Google (just spot-checked few locales that require inheritance - ie. deCH) and looks like votes on Inheritance got ignored in the automatic import.

comment:2 Changed 7 months ago by tbishop

What do the three "upwards arrow" characters indicate?

Feb February fevereiro ↑↑↑

Last edited 7 months ago by tbishop (previous) (diff)

comment:3 Changed 7 months ago by emmons

  • Status changed from new to accepted
  • Component changed from unknown to survey
  • Priority changed from assess to major
  • Milestone changed from UNSCH to 34
  • Owner changed from anybody to tbishop
  • type changed from unknown to survey

comment:4 Changed 7 months ago by tbishop

Information about inheritance: http://cldr.unicode.org/index/survey-tool/guide#TOC-Inheritance

Source code associates "↑↑↑" with "Bailey". What does "Bailey" mean in this context?

  • courtyard of a castle or fortification, enclosed by a curtain wall
  • girl that has all of the qualities that any guy could ever ask for
  • type of alcoholic liqueur
  • In the classic movie It's a Wonderful Life, George Bailey is treated to what historians call a "counterfactual"—he gets to look at a parallel universe that differs from his only in that he is not in it.

Clue in CLDRFile.java:

    /**
     * Get GeorgeBailey value: that is, what the value would be if it were not directly contained in the file.
     * A non-resolving CLDRFile will always return null.
     */
    public String getBaileyValue(String xpath, Output<String> pathWhereFound, Output<String> localeWhereFound) {

Last edited 7 months ago by tbishop (previous) (diff)

comment:5 Changed 7 months ago by tbishop

When should a vote for "↑↑↑" a.k.a. CldrUtility.INHERITANCE_MARKER count as winning?

Maybe if

file.getStringValue(xpathString).equals(file.getWinningValueWithBailey(xpathString))

?

Last edited 7 months ago by tbishop (previous) (diff)

comment:6 Changed 6 months ago by mark

As I recall, this is how it should work: you basically combine the implicit (↑↑↑) and explicit votes to see what wins, then pick the best of those if it does.

Sum up the votes for ↑↑↑ AND the votes for the explicit parent value that it points to. If that total wins, then pick the highest vote value and that one wins. If they are equal choose ↑↑↑.

Example 1.

parent:
"center" = winning value

child:
"center" 5 votes
"↑↑↑" 4 votes
"centre" 4 votes

Then the total for "center", implicit and explicit, is 9 votes. So that total wins (as a combo). Then between them, the explicit "center" has the most votes, so it is the winning value.

Example 2. Same except:

child:
"center" 4 votes
"↑↑↑" 4 votes
"centre" 4 votes

The total for "center", implicit and explicit, is 8 votes. So it still wins (as a combo). But this time, the votes for implicit = votes for explicit. So implicit ("↑↑↑") wins (because it wins ties).

Last edited 6 months ago by mark (previous) (diff)

comment:7 Changed 6 months ago by kristi

  • Keywords STP1 added
  • Priority changed from major to critical

comment:8 Changed 6 months ago by tbishop

This appears to be a solution: count a vote for "↑↑↑" a.k.a. CldrUtility.INHERITANCE_MARKER as winning if

file.getStringValue(xpathString).equals(file.getBaileyValue(xpathString, null, null))

With a particular saved version of the database (from 2018-5-25), logging in as user 1487, auto-import finds 6 losing votes for inheritance. This is with real votes, not "mock" data. The locale is ar_SA.

The 6 votes are for inheritance; that is, this user voted for ↑↑↑. The votes are losing since the values of file.getStringValue(xpathString) and file.getBaileyValue(xpathString, null, null) aren't equal. Most of the time those values are equal, meaning the vote for inheritance is winning.

There's some harmless duplication among the six due to votes from different old vote tables; without the duplication there are four votes.

bailey = ليلاً; curValue = ل
bailey = ليلاً; curValue = ل
bailey = مكاو الصينية (منطقة إدارية خاصة); curValue = ماكاو الصينية (منطقة إدارية خاصة)
bailey = مكاو; curValue = ماكاو
bailey = جزيرة أسينشيون; curValue = جزيرة أسينشين
bailey = ليلاً; curValue = ل

The changes are in branches/tbishop/t11133_import_inherit.

Last edited 6 months ago by tbishop (previous) (diff)

comment:9 Changed 6 months ago by tbishop

I've committed changes to trunk as changeset [14251].

comment:10 Changed 6 months ago by tbishop

Tested on smoketest: logged in as user 1487.

4,132 old winning votes were automatically imported

Still need to confirm those include votes for inheritance...

comment:11 Changed 6 months ago by tbishop

After the auto-import, I checked the database on smoketest SQL Console with this query:

select * from cldr_vote_value_34_beta where submitter=1487 and value="↑↑↑"

1,084 rows were returned. The first three:

0 	ar_SA 	1 	1487 	↑↑↑	2018-06-20 18:50:33.0 	
1 	ar_SA 	4 	1487 	↑↑↑	2018-06-20 18:50:33.0 	
2 	ar_SA 	10 	1487 	↑↑↑	2018-06-20 18:50:33.0 	

This confirms that votes for inheritance were auto-imported.

comment:12 Changed 6 months ago by tbishop

  • Status changed from accepted to reviewing
  • Review set to kristi

comment:13 Changed 4 months ago by kristi

  • Review changed from kristi to srl

I had verified this on smoketest and the import in production received no additional feedback.
I thought Steven did a code review, but I don't see any comments in this thread.

Assigning the Reviewer to Steven for a code review.

comment:14 Changed 2 months ago by srl

  • Status changed from reviewing to closed
  • Resolution set to fixed
View

Add a comment

Modify Ticket

Action
as closed
Next status will be 'new'
Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.