Closed Bug 949622 Opened 11 years ago Closed 10 years ago

[meta] Display what locale version/date is being used in healthcheck

Categories

(Webmaker Graveyard :: Localization, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jon, Assigned: alicoding)

Details

Attachments

(7 files)

It is currently not possible to know what version of a locale we're using right now. We should add some data/time information to /healtheck, and we should set this information in the s3 sync script we have setup.
So I was trying to figure out how to do this since there are many ways to do it.

Summary of what I thought this should be (I would like to have some input before doing it):

1. Should be a separate script doing query with Transifex then save them in the same bucket we have for all translation files except it should be in root folder (locale/metadata.json).

2. Then we have another script download them, but parse only langauges that currently available in `locale/<locale>`  so if we only have `en_US` it should be an empty file, but if we have all then we get the whole json info back.

3. This should be format of /healthcheck

{
  "http": "okay",
  "version": "1.0.41",
  "Support languages": {
    "bn-BD": "2014-01-07T15:05:47.000Z",
    "ru-RU": "2014-01-07T15:05:47.000Z",
    "es": "2014-01-07T15:05:47.000Z",
    "th-TH": "2014-01-07T15:05:47.000Z"
  }
}


I don't know what other information we want there, but our current problem of not being able to complete this at the moment is how all our resource files on transifex being manage.

To access and get data for each project (e.g. Thimble, popcorn, Webmaker) is impossible without doing some analysis from the data we got in return because we have to go through all the resource files and then figure out which file is belong to which project then return the time based on that.

Some example https://www.transifex.com/api/2/project/webmaker/resource/weblit/stats 

But this is some snippet from the data

{
    "es_NI": {
        "reviewed_percentage": "0%", 
        "completed": "2%", 
        "untranslated_words": 871, 
        "last_commiter": "aali", 
        "reviewed": 0, 
        "translated_entities": 3, 
        "translated_words": 3, 
        "last_update": "2014-02-18 08:46:02", 
        "untranslated_entities": 105
    }, 
    "ga": {
        "reviewed_percentage": "0%", 
        "completed": "0%", 
        "untranslated_words": 874, 
        "last_commiter": "aali", 
        "reviewed": 0, 
        "translated_entities": 0, 
        "translated_words": 0, 
        "last_update": "2014-02-18 08:46:01", 
        "untranslated_entities": 108
    }, 
    "ta_IN": {
        "reviewed_percentage": "0%", 
        "completed": "0%", 
        "untranslated_words": 874, 
        "last_commiter": "aali", 
        "reviewed": 0, 
        "translated_entities": 0, 
        "translated_words": 0, 
        "last_update": "2014-02-18 08:46:02", 
        "untranslated_entities": 108
    }, 
    "th_TH": {
        "reviewed_percentage": "92%", 
        "completed": "92%", 
        "untranslated_words": 176, 
        "last_commiter": "aali", 
        "reviewed": 100, 
        "translated_entities": 100, 
        "translated_words": 698, 
        "last_update": "2014-02-18 08:46:05", 
        "untranslated_entities": 8
    }, 

Above data is only the file for Weblit which is in Webmaker, but we have another file there too, and for Goggles we have more than one file same with Thimble.

P.S you will need your Transifex credential to see the data there.
Flags: needinfo?(jon)
So, the locale directory is structured like:

locale:
- en_US
  - a.json
  - b.json
- th_TH
  - a.json
  - b.json

What if that format was just mirrored for the healthcheck?

{
  "http": "okay",
  "version": "1.0.0",
  "locales": {
    "en_US": {
      "a.json": "some date",
      "b.json": "some date"
    },
    "th_TH": {
      "a.json": "some date",
      "b.json": "some date"
    }
  }
}
Flags: needinfo?(jon)
Attachment #8406882 - Flags: review?(jon) → review?(cade)
Attachment #8406886 - Flags: review?(jon) → review?(cade)
All patches has been update to the latest implementation as we've discussed.
Attachment #8406886 - Flags: review?(cade) → review+
Attachment #8406894 - Flags: review?(cade) → review+
Attachment #8406913 - Flags: review?(cade) → review+
Attachment #8406928 - Flags: review?(cade) → review+
Attachment #8406930 - Flags: review?(cade) → review+
Attachment #8406932 - Flags: review?(cade) → review+
Comment on attachment 8406882 [details] [review]
https://github.com/mozilla/webmaker.org/pull/683

r+ with removal of image optimizations in the commit.
Attachment #8406882 - Flags: review?(cade) → review+
Commit pushed to master at https://github.com/mozilla/webmaker.org

https://github.com/mozilla/webmaker.org/commit/7a5d9c30c775c82ec28a8f5986ee07a5941257f2
bug949622 - Display what locale version/date is being used in healthcheck
Commit pushed to master at https://github.com/mozilla/make-valet

https://github.com/mozilla/make-valet/commit/723264c8494bb5f387e4dce496994c91ded15975
bug949622 - Display what locale version/date is being used in
healthcheck
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: