+ this.store = new Map();
+ this.parseTranslations();
+ }
+
+ /**
+ * Parse translations out of the page and place into the store.
+ */
+ parseTranslations() {
+ const translationMetaTags = document.querySelectorAll('meta[name="translation"]');
+ for (let tag of translationMetaTags) {
+ const key = tag.getAttribute('key');
+ const value = tag.getAttribute('value');
+ this.store.set(key, value);
+ }