()
| 129 | } |
| 130 | |
| 131 | protected fetchAndStoreLocStrings(): Promise<{}> { |
| 132 | // navigator.userLanguage is only available in IE, and Typescript will not recognize this property |
| 133 | let locale = navigator.language || (<any>navigator).userLanguage; |
| 134 | |
| 135 | return LocalizationHelper.makeLocStringsFetchRequest(locale).then((responsePackage) => { |
| 136 | try { |
| 137 | let locStringsDict = JSON.parse(responsePackage.parsedResponse); |
| 138 | if (locStringsDict) { |
| 139 | this.clipperData.setValue(ClipperStorageKeys.locale, locale); |
| 140 | this.clipperData.setValue(ClipperStorageKeys.locStrings, responsePackage.parsedResponse); |
| 141 | Localization.setLocalizedStrings(locStringsDict); |
| 142 | } |
| 143 | return Promise.resolve(locStringsDict); |
| 144 | } catch (e) { |
| 145 | return Promise.reject(undefined); |
| 146 | } |
| 147 | }); |
| 148 | } |
| 149 | |
| 150 | /** |
| 151 | * Returns the URL for more information about the Clipper |
nothing calls this directly
no test coverage detected