This commit is contained in:
@@ -3,24 +3,8 @@ import config from "../utils/config";
|
||||
import api from "./apiutil";
|
||||
import _ from "../utils/libs/core.min.js";
|
||||
|
||||
/*
|
||||
Locale:
|
||||
Methods
|
||||
- This module is responsible for handling all localized text operations
|
||||
- It stores a local in memory cache of the keys and returns them from cache whenever possible
|
||||
- Method: Get keys one at a time or in an array
|
||||
- a method that accepts lt keys and returns their text
|
||||
- If a key is not in the cache here then it returns an obvious error string
|
||||
- Method: pre-fetch / Cache keys
|
||||
- Used to pre-fetch a bunch of keys at once if necessary
|
||||
- A caller will call this with the list of keys it will need in advance, the ones that are not present in the cache will be fetched from the server and the cache populated
|
||||
- No text is actually returned at this point, it's just a pre-setup kind of thing to ensure better perf later
|
||||
- Method: Clear cache
|
||||
- Clear the local cache entirely
|
||||
|
||||
|
||||
*/
|
||||
|
||||
//Keep the localized text keys here temporarily
|
||||
//TODO: rehydrate on page refresh / put in sessionstorage
|
||||
var lt = {};
|
||||
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user