summaryrefslogtreecommitdiff
path: root/ext/js/language/languages.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/language/languages.js')
-rwxr-xr-xext/js/language/languages.js17
1 files changed, 15 insertions, 2 deletions
diff --git a/ext/js/language/languages.js b/ext/js/language/languages.js
index 63bbc791..4b196c2c 100755
--- a/ext/js/language/languages.js
+++ b/ext/js/language/languages.js
@@ -22,8 +22,8 @@ import {languageDescriptorMap} from './language-descriptors.js';
*/
export function getLanguageSummaries() {
const results = [];
- for (const {name, iso, exampleText, languageTransformsFile} of languageDescriptorMap.values()) {
- results.push({name, iso, exampleText, languageTransformsFile});
+ for (const {name, iso, exampleText} of languageDescriptorMap.values()) {
+ results.push({name, iso, exampleText});
}
return results;
}
@@ -58,3 +58,16 @@ export function isTextLookupWorthy(text, language) {
if (typeof descriptor === 'undefined') { return false; }
return typeof descriptor.isTextLookupWorthy === 'undefined' || descriptor.isTextLookupWorthy(text);
}
+
+/**
+ * @returns {import('language').LanguageAndTransforms[]}
+ */
+export function getAllLanguageTransformDescriptors() {
+ const results = [];
+ for (const {iso, languageTransforms} of languageDescriptorMap.values()) {
+ if (languageTransforms) {
+ results.push({iso, languageTransforms});
+ }
+ }
+ return results;
+}