• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

moment / moment / 4820
89%
master: 88%

Build:
Build:
LAST BUILD BRANCH: wip/weird-weeks
DEFAULT BRANCH: master
Ran 25 Apr 2020 08:43PM UTC
Jobs 4
Files 321
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
4820

push

travis-ci

web-flow
[bugfix] Properly fallback to base locales in array getter (#5459)

It looks like the existing implementation of this feature was pretty
well thought out and correct, the problem was that a compareArray
function was used which was comparing arrays in a rather bizzare
fashion that was not in line with what a "normal person" would expect.
So now the array comparator is correct, and the logic works properly.

The logic works as follows -- the next locale is picked and tried as-is.
If that fails, the code normally tries to chop the last bit (normally
the country designation) and try again. However, if the next array
element has the same or longer prefix as the one to be tried, the
iteration continues. So for example if the array has the sequence

    "AA-BB", "AA-CC", "XX-YY"

then first "AA-BB" is tried, then a naive solution would try "AA", but
this one instead checks to see that "AA-CC" is actually more concrete
than "AA", so it tries "AA-CC" next, and only after it fails (if it
fails) it tries "AA", because "XX-YY" does not have "AA" as prefix. So
in the end the following locales are tried in this order (assuming all
fail so the next one is tried):

    "AA-BB", "AA-CC", "AA", "XX-YY", "XX"

Fixes #4780

7387 of 14519 branches covered (50.88%)

45205 of 51145 relevant lines covered (88.39%)

9002.45 hits per line

Jobs
ID Job ID Ran Files Coverage
1 4820.1 (SAUCE_USERNAME=[secure] SAUCE_ACCESS_KEY=[secure]) 25 Apr 2020 08:44PM UTC 0
88.39
Travis Job 4820.1
2 4820.2 (SAUCE_USERNAME=[secure] SAUCE_ACCESS_KEY=[secure]) 25 Apr 2020 08:43PM UTC 0
88.39
Travis Job 4820.2
3 4820.3 (SAUCE_USERNAME=[secure] SAUCE_ACCESS_KEY=[secure]) 25 Apr 2020 08:43PM UTC 0
88.39
Travis Job 4820.3
4 4820.4 (SAUCE_USERNAME=[secure] SAUCE_ACCESS_KEY=[secure]) 25 Apr 2020 08:44PM UTC 0
88.39
Travis Job 4820.4
Source Files on build 4820
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #4820
  • 4dfb749e on github
  • Prev Build on develop (#4817)
  • Next Build on develop (#4821)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc