phetsims / rosetta

PhET's Simulation Translation Utility
MIT License
3 stars 1 forks source link

Locale info not getting updated very often on live translation utility #431

Closed jbphet closed 5 months ago

jbphet commented 5 months ago

An effort has been underway recently to add translation support for more locales and to improve the fallback handling (there are several issues related to this, a few of the major ones are https://github.com/phetsims/joist/issues/963, https://github.com/phetsims/website-meteor/issues/489, and https://github.com/phetsims/chipper/issues/1441). As part of the effort, changes were made to the shared chipper/data/localeInfo.json file, and Rosetta is supposed to re-read this file periodically from GitHub and thereby auto-update its list of locales. However, when the changes were made, Rosetta didn't update, and I had to manually restart it to get them to show up. I reviewed the log to see if I could determine whether updates to the locale data were occurring, and the were, but pretty infrequently. Here are the two most recent log entries that indicate a re-read of the local info file:

.
.
.
May 17 20:24:05 phet-server2.int.colorado.edu rosetta[166423]: info: locale info is stale or nonexistent; getting it
.
.
.
Jun 02 00:24:45 phet-server2.int.colorado.edu rosetta[166423]: info: locale info is stale or nonexistent; getting it
.
.
.

This is a little over two weeks. I think I should shorten the time.

Note that this value isn't hard-coded into Rosetta, it's a configuration options in the rosetta-config.json file, and the options is called VALID_LOCALE_INFO_DURATION.

jbphet commented 5 months ago

On phet-server2, where the live instance of Rosetta runs, the configuration file contains the following line:

"VALID_LOCALE_INFO_DURATION": 1209600000,

This value is in milliseconds. I did the conversion, and this is indeed two weeks. I think I'll reduce it to 12 hours.

jbphet commented 5 months ago

I have changed the value in the config file to 43200000, which is 12 hours. I think that should do it, closing.