Browse Source

Merge branch 'habenamare-currency-custom-field'

Lauri Ojansivu 5 years ago
parent
commit
3e4a9471ba
60 changed files with 261 additions and 4 deletions
  1. 17 0
      client/components/cards/cardCustomFields.jade
  2. 30 0
      client/components/cards/cardCustomFields.js
  3. 6 2
      client/components/cards/minicard.jade
  4. 14 0
      client/components/cards/minicard.js
  5. 11 0
      client/components/sidebar/sidebarCustomFields.jade
  6. 72 1
      client/components/sidebar/sidebarCustomFields.js
  7. 2 0
      i18n/ar.i18n.json
  8. 2 0
      i18n/bg.i18n.json
  9. 2 0
      i18n/br.i18n.json
  10. 2 0
      i18n/ca.i18n.json
  11. 2 0
      i18n/cs.i18n.json
  12. 2 0
      i18n/da.i18n.json
  13. 2 0
      i18n/de.i18n.json
  14. 2 0
      i18n/el.i18n.json
  15. 2 0
      i18n/en-GB.i18n.json
  16. 2 0
      i18n/en.i18n.json
  17. 2 0
      i18n/eo.i18n.json
  18. 2 0
      i18n/es-AR.i18n.json
  19. 2 0
      i18n/es-CL.i18n.json
  20. 2 0
      i18n/es.i18n.json
  21. 2 0
      i18n/eu.i18n.json
  22. 2 0
      i18n/fa.i18n.json
  23. 2 0
      i18n/fi.i18n.json
  24. 2 0
      i18n/fr.i18n.json
  25. 2 0
      i18n/gl.i18n.json
  26. 2 0
      i18n/he.i18n.json
  27. 2 0
      i18n/hi.i18n.json
  28. 2 0
      i18n/hu.i18n.json
  29. 2 0
      i18n/hy.i18n.json
  30. 2 0
      i18n/id.i18n.json
  31. 2 0
      i18n/ig.i18n.json
  32. 2 0
      i18n/it.i18n.json
  33. 2 0
      i18n/ja.i18n.json
  34. 2 0
      i18n/ka.i18n.json
  35. 2 0
      i18n/km.i18n.json
  36. 2 0
      i18n/ko.i18n.json
  37. 2 0
      i18n/lv.i18n.json
  38. 2 0
      i18n/mk.i18n.json
  39. 2 0
      i18n/mn.i18n.json
  40. 2 0
      i18n/nb.i18n.json
  41. 2 0
      i18n/nl.i18n.json
  42. 2 0
      i18n/oc.i18n.json
  43. 2 0
      i18n/pl.i18n.json
  44. 2 0
      i18n/pt-BR.i18n.json
  45. 2 0
      i18n/pt.i18n.json
  46. 2 0
      i18n/ro.i18n.json
  47. 2 0
      i18n/ru.i18n.json
  48. 2 0
      i18n/sl.i18n.json
  49. 2 0
      i18n/sr.i18n.json
  50. 2 0
      i18n/sv.i18n.json
  51. 2 0
      i18n/sw.i18n.json
  52. 2 0
      i18n/ta.i18n.json
  53. 2 0
      i18n/th.i18n.json
  54. 2 0
      i18n/tr.i18n.json
  55. 2 0
      i18n/uk.i18n.json
  56. 2 0
      i18n/vi.i18n.json
  57. 2 0
      i18n/zh-CN.i18n.json
  58. 2 0
      i18n/zh-HK.i18n.json
  59. 2 0
      i18n/zh-TW.i18n.json
  60. 5 1
      models/customFields.js

+ 17 - 0
client/components/cards/cardCustomFields.jade

@@ -53,6 +53,23 @@ template(name="cardCustomField-number")
         if value
             = value
 
+template(name="cardCustomField-currency")
+    if canModifyCard
+        +inlinedForm(classNames="js-card-customfield-currency")
+            input(type="text" value=data.value)
+            .edit-controls.clearfix
+                button.primary(type="submit") {{_ 'save'}}
+                a.fa.fa-times-thin.js-close-inlined-form
+        else
+            a.js-open-inlined-form
+                if value
+                    = formattedValue
+                else
+                    | {{_ 'edit'}}
+    else
+        if value
+            = formattedValue
+
 template(name="cardCustomField-date")
     if canModifyCard
         a.js-edit-date(title="{{showTitle}}" class="{{classes}}")

+ 30 - 0
client/components/cards/cardCustomFields.js

@@ -80,6 +80,36 @@ CardCustomField.register('cardCustomField');
   }
 }.register('cardCustomField-number'));
 
+// cardCustomField-currency
+(class extends CardCustomField {
+  onCreated() {
+    super.onCreated();
+
+    this.currencyCode = this.data().definition.settings.currencyCode;
+  }
+
+  formattedValue() {
+    const locale = TAPi18n.getLanguage();
+
+    return new Intl.NumberFormat(locale, {
+      style: 'currency',
+      currency: this.currencyCode,
+    }).format(this.data().value);
+  }
+
+  events() {
+    return [
+      {
+        'submit .js-card-customfield-currency'(event) {
+          event.preventDefault();
+          const value = Number(this.find('input').value, 10);
+          this.card.setCustomField(this.customFieldId, value);
+        },
+      },
+    ];
+  }
+}.register('cardCustomField-currency'));
+
 // cardCustomField-date
 (class extends CardCustomField {
   onCreated() {

+ 6 - 2
client/components/cards/minicard.jade

@@ -74,8 +74,12 @@ template(name="minicard")
                   +viewer
                     = definition.name
               .minicard-custom-field-item
-                +viewer
-                  = trueValue
+                if $eq definition.type "currency"
+                  +viewer
+                    = formattedCurrencyCustomFieldValue(definition)
+                else
+                  +viewer
+                    = trueValue
 
     if getAssignees
       .minicard-assignees.js-minicard-assignees

+ 14 - 0
client/components/cards/minicard.js

@@ -9,6 +9,20 @@ BlazeComponent.extendComponent({
     return 'minicard';
   },
 
+  formattedCurrencyCustomFieldValue(definition) {
+    const customField = this.data()
+      .customFieldsWD()
+      .find(f => f._id === definition._id);
+    const customFieldTrueValue =
+      customField && customField.trueValue ? customField.trueValue : '';
+
+    const locale = TAPi18n.getLanguage();
+    return new Intl.NumberFormat(locale, {
+      style: 'currency',
+      currency: definition.settings.currencyCode,
+    }).format(customFieldTrueValue);
+  },
+
   events() {
     return [
       {

+ 11 - 0
client/components/sidebar/sidebarCustomFields.jade

@@ -33,6 +33,17 @@ template(name="createCustomFieldPopup")
                         option(value=value selected="selected") {{name}}
                     else
                         option(value=value) {{name}}
+
+        div.js-field-settings.js-field-settings-currency(class="{{#if isTypeNotSelected 'currency'}}hide{{/if}}")
+            label
+                | {{_ 'custom-field-currency-option'}}
+            select.js-field-currency
+              each getCurrencyCodes
+                if selected
+                  option(value=value selected="selected") {{name}}
+                else
+                  option(value=value) {{name}}
+
         div.js-field-settings.js-field-settings-dropdown(class="{{#if isTypeNotSelected 'dropdown'}}hide{{/if}}")
             label
                 | {{_ 'custom-field-dropdown-options'}}

+ 72 - 1
client/components/sidebar/sidebarCustomFields.js

@@ -16,12 +16,62 @@ BlazeComponent.extendComponent({
 }).register('customFieldsSidebar');
 
 const CreateCustomFieldPopup = BlazeComponent.extendComponent({
-  _types: ['text', 'number', 'date', 'dropdown'],
+  _types: ['text', 'number', 'date', 'dropdown', 'currency'],
+
+  _currencyList: [
+    {
+      name: 'US Dollar',
+      code: 'USD',
+    },
+    {
+      name: 'Euro',
+      code: 'EUR',
+    },
+    {
+      name: 'Yen',
+      code: 'JPY',
+    },
+    {
+      name: 'Pound Sterling',
+      code: 'GBP',
+    },
+    {
+      name: 'Australian Dollar',
+      code: 'AUD',
+    },
+    {
+      name: 'Canadian Dollar',
+      code: 'CAD',
+    },
+    {
+      name: 'Swiss Franc',
+      code: 'CHF',
+    },
+    {
+      name: 'Yuan Renminbi',
+      code: 'CNY',
+    },
+    {
+      name: 'Hong Kong Dollar',
+      code: 'HKD',
+    },
+    {
+      name: 'New Zealand Dollar',
+      code: 'NZD',
+    },
+  ],
 
   onCreated() {
     this.type = new ReactiveVar(
       this.data().type ? this.data().type : this._types[0],
     );
+
+    this.currencyCode = new ReactiveVar(
+      this.data().settings && this.data().settings.currencyCode
+        ? this.data().settings.currencyCode
+        : this._currencyList[0].code,
+    );
+
     this.dropdownItems = new ReactiveVar(
       this.data().settings && this.data().settings.dropdownItems
         ? this.data().settings.dropdownItems
@@ -44,6 +94,18 @@ const CreateCustomFieldPopup = BlazeComponent.extendComponent({
     return this.type.get() !== type;
   },
 
+  getCurrencyCodes() {
+    const currentCode = this.currencyCode.get();
+
+    return this._currencyList.map(({ name, code }) => {
+      return {
+        name: `${code} - ${name}`,
+        value: code,
+        selected: code === currentCode,
+      };
+    });
+  },
+
   getDropdownItems() {
     const items = this.dropdownItems.get();
     Array.from(this.findAll('.js-field-settings-dropdown input')).forEach(
@@ -62,6 +124,11 @@ const CreateCustomFieldPopup = BlazeComponent.extendComponent({
   getSettings() {
     const settings = {};
     switch (this.type.get()) {
+      case 'currency': {
+        const currencyCode = this.currencyCode.get();
+        settings.currencyCode = currencyCode;
+        break;
+      }
       case 'dropdown': {
         const dropdownItems = this.getDropdownItems().filter(
           item => !!item.name.trim(),
@@ -80,6 +147,10 @@ const CreateCustomFieldPopup = BlazeComponent.extendComponent({
           const value = evt.target.value;
           this.type.set(value);
         },
+        'change .js-field-currency'(evt) {
+          const value = evt.target.value;
+          this.currencyCode.set(value);
+        },
         'keydown .js-dropdown-item.last'(evt) {
           if (evt.target.value.trim() && evt.keyCode === 13) {
             const items = this.getDropdownItems();

+ 2 - 0
i18n/ar.i18n.json

@@ -256,6 +256,8 @@
   "current": "الحالي",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Checkbox",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "تاريخ",
   "custom-field-dropdown": "Dropdown List",
   "custom-field-dropdown-none": "(none)",

+ 2 - 0
i18n/bg.i18n.json

@@ -256,6 +256,8 @@
   "current": "сегашен",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Чекбокс",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Дата",
   "custom-field-dropdown": "Падащо меню",
   "custom-field-dropdown-none": "(няма)",

+ 2 - 0
i18n/br.i18n.json

@@ -256,6 +256,8 @@
   "current": "current",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Checkbox",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Date",
   "custom-field-dropdown": "Dropdown List",
   "custom-field-dropdown-none": "(none)",

+ 2 - 0
i18n/ca.i18n.json

@@ -256,6 +256,8 @@
   "current": "Actual",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Checkbox",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Data",
   "custom-field-dropdown": "Dropdown List",
   "custom-field-dropdown-none": "(none)",

+ 2 - 0
i18n/cs.i18n.json

@@ -256,6 +256,8 @@
   "current": "Aktuální",
   "custom-field-delete-pop": "Nelze vrátit zpět. Toto odebere toto vlastní pole ze všech karet a zničí jeho historii.",
   "custom-field-checkbox": "Checkbox",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Datum",
   "custom-field-dropdown": "Rozbalovací seznam",
   "custom-field-dropdown-none": "(prázdné)",

+ 2 - 0
i18n/da.i18n.json

@@ -256,6 +256,8 @@
   "current": "nuværende",
   "custom-field-delete-pop": "Du kan ikke fortryde handlingen. Dette vil fjerne dette brugerdefinerede felt fra alle kort og tilintetgøre dens historik.",
   "custom-field-checkbox": "Afkrydsningsfelt",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Dato",
   "custom-field-dropdown": "Rullegardinliste",
   "custom-field-dropdown-none": "(ingen)",

+ 2 - 0
i18n/de.i18n.json

@@ -256,6 +256,8 @@
   "current": "aktuell",
   "custom-field-delete-pop": "Dies wird das Feld aus allen Karten entfernen und den dazugehörigen Verlauf löschen. Die Aktion kann nicht rückgängig gemacht werden.",
   "custom-field-checkbox": "Kontrollkästchen",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Datum",
   "custom-field-dropdown": "Dropdownliste",
   "custom-field-dropdown-none": "(keiner)",

+ 2 - 0
i18n/el.i18n.json

@@ -256,6 +256,8 @@
   "current": "current",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Checkbox",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Ημερομηνία",
   "custom-field-dropdown": "Dropdown List",
   "custom-field-dropdown-none": "(none)",

+ 2 - 0
i18n/en-GB.i18n.json

@@ -256,6 +256,8 @@
   "current": "current",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Checkbox",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Date",
   "custom-field-dropdown": "Dropdown List",
   "custom-field-dropdown-none": "(none)",

+ 2 - 0
i18n/en.i18n.json

@@ -256,6 +256,8 @@
   "current": "current",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Checkbox",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Date",
   "custom-field-dropdown": "Dropdown List",
   "custom-field-dropdown-none": "(none)",

+ 2 - 0
i18n/eo.i18n.json

@@ -256,6 +256,8 @@
   "current": "current",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Checkbox",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Dato",
   "custom-field-dropdown": "Dropdown List",
   "custom-field-dropdown-none": "(none)",

+ 2 - 0
i18n/es-AR.i18n.json

@@ -256,6 +256,8 @@
   "current": "actual",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Checkbox",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Fecha",
   "custom-field-dropdown": "Dropdown List",
   "custom-field-dropdown-none": "(ninguno)",

+ 2 - 0
i18n/es-CL.i18n.json

@@ -256,6 +256,8 @@
   "current": "actual",
   "custom-field-delete-pop": "Se eliminará este campo personalizado de todas las tarjetas y se destruirá su historial. Esta acción no puede deshacerse.",
   "custom-field-checkbox": "Casilla de verificación",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Fecha",
   "custom-field-dropdown": "Lista desplegable",
   "custom-field-dropdown-none": "(nada)",

+ 2 - 0
i18n/es.i18n.json

@@ -256,6 +256,8 @@
   "current": "actual",
   "custom-field-delete-pop": "Se eliminará este campo personalizado de todas las tarjetas y se destruirá su historial. Esta acción no puede deshacerse.",
   "custom-field-checkbox": "Casilla de verificación",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Fecha",
   "custom-field-dropdown": "Lista desplegable",
   "custom-field-dropdown-none": "(nada)",

+ 2 - 0
i18n/eu.i18n.json

@@ -256,6 +256,8 @@
   "current": "unekoa",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Checkbox",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Data",
   "custom-field-dropdown": "Dropdown List",
   "custom-field-dropdown-none": "(none)",

+ 2 - 0
i18n/fa.i18n.json

@@ -256,6 +256,8 @@
   "current": "جاری",
   "custom-field-delete-pop": "این اقدام فیلدشخصی را بهمراه تمامی تاریخچه آن از کارت ها پاک می کند و برگشت پذیر نمی باشد",
   "custom-field-checkbox": "جعبه انتخابی",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "تاریخ",
   "custom-field-dropdown": "لیست افتادنی",
   "custom-field-dropdown-none": "(هیچ)",

+ 2 - 0
i18n/fi.i18n.json

@@ -256,6 +256,8 @@
   "current": "nykyinen",
   "custom-field-delete-pop": "Tätä ei voi peruuttaa. Tämä poistaa tämän mukautetun kentän kaikista korteista ja poistaa sen historian.",
   "custom-field-checkbox": "Valintaruutu",
+  "custom-field-currency": "Valuutta",
+  "custom-field-currency-option": "Valuutta koodi",
   "custom-field-date": "Päivämäärä",
   "custom-field-dropdown": "Pudotusvalikko",
   "custom-field-dropdown-none": "(ei mitään)",

+ 2 - 0
i18n/fr.i18n.json

@@ -256,6 +256,8 @@
   "current": "actuel",
   "custom-field-delete-pop": "Cette action n'est pas réversible. Elle supprimera ce champ personnalisé de toutes les cartes et détruira son historique.",
   "custom-field-checkbox": "Case à cocher",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Date",
   "custom-field-dropdown": "Liste de choix",
   "custom-field-dropdown-none": "(aucun)",

+ 2 - 0
i18n/gl.i18n.json

@@ -256,6 +256,8 @@
   "current": "actual",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Checkbox",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Data",
   "custom-field-dropdown": "Dropdown List",
   "custom-field-dropdown-none": "(none)",

+ 2 - 0
i18n/he.i18n.json

@@ -256,6 +256,8 @@
   "current": "נוכחי",
   "custom-field-delete-pop": "אין אפשרות לבטל את הפעולה. הפעולה תסיר את השדה שהותאם אישית מכל הכרטיסים ותשמיד את ההיסטוריה שלו.",
   "custom-field-checkbox": "תיבת סימון",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "תאריך",
   "custom-field-dropdown": "רשימה נגללת",
   "custom-field-dropdown-none": "(ללא)",

+ 2 - 0
i18n/hi.i18n.json

@@ -256,6 +256,8 @@
   "current": "वर्तमान",
   "custom-field-delete-pop": "कोई पूर्ववत् नहीं है । यह सभी कार्ड से इस कस्टम क्षेत्र को हटा दें और इसके इतिहास को नष्ट कर देगा ।",
   "custom-field-checkbox": "निशानबक्से",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "दिनांक",
   "custom-field-dropdown": "ड्रॉपडाउन सूची",
   "custom-field-dropdown-none": "(कोई नहीं)",

+ 2 - 0
i18n/hu.i18n.json

@@ -256,6 +256,8 @@
   "current": "jelenlegi",
   "custom-field-delete-pop": "Nincs visszavonás. Ez el fogja távolítani az egyéni mezőt az összes kártyáról, és megsemmisíti az előzményeit.",
   "custom-field-checkbox": "Jelölőnégyzet",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Dátum",
   "custom-field-dropdown": "Legördülő lista",
   "custom-field-dropdown-none": "(nincs)",

+ 2 - 0
i18n/hy.i18n.json

@@ -256,6 +256,8 @@
   "current": "current",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Checkbox",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Date",
   "custom-field-dropdown": "Dropdown List",
   "custom-field-dropdown-none": "(none)",

+ 2 - 0
i18n/id.i18n.json

@@ -256,6 +256,8 @@
   "current": "sekarang",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Checkbox",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Tanggal",
   "custom-field-dropdown": "Dropdown List",
   "custom-field-dropdown-none": "(none)",

+ 2 - 0
i18n/ig.i18n.json

@@ -256,6 +256,8 @@
   "current": "current",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Checkbox",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Date",
   "custom-field-dropdown": "Dropdown List",
   "custom-field-dropdown-none": "(none)",

+ 2 - 0
i18n/it.i18n.json

@@ -256,6 +256,8 @@
   "current": "corrente",
   "custom-field-delete-pop": "Non potrai tornare indietro. Questa azione rimuoverà questo campo personalizzato da tutte le schede ed eliminerà ogni sua traccia.",
   "custom-field-checkbox": "Casella di scelta",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Data",
   "custom-field-dropdown": "Lista a discesa",
   "custom-field-dropdown-none": "(niente)",

+ 2 - 0
i18n/ja.i18n.json

@@ -256,6 +256,8 @@
   "current": "現在",
   "custom-field-delete-pop": "この操作は取り消しできません。このカスタムフィールドはすべてのカードから外され履歴からも見えなくなります。",
   "custom-field-checkbox": "チェックボックス",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "日付",
   "custom-field-dropdown": "ドロップダウンリスト",
   "custom-field-dropdown-none": "(none)",

+ 2 - 0
i18n/ka.i18n.json

@@ -256,6 +256,8 @@
   "current": "მიმდინარე",
   "custom-field-delete-pop": "ქმედება გამოიწვევს მომხმარებლის ველის წაშლას ყველა ბარათიდან და გაანადგურებს მის ისტორიას, რის შემდეგაც შეუძლებელი იქნება მისი უკან დაბრუნება. ",
   "custom-field-checkbox": "მოსანიშნი გრაფა",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "თარიღი",
   "custom-field-dropdown": "ჩამოსაშლელი სია",
   "custom-field-dropdown-none": "(ცარიელი)",

+ 2 - 0
i18n/km.i18n.json

@@ -256,6 +256,8 @@
   "current": "current",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Checkbox",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Date",
   "custom-field-dropdown": "Dropdown List",
   "custom-field-dropdown-none": "(none)",

+ 2 - 0
i18n/ko.i18n.json

@@ -256,6 +256,8 @@
   "current": "경향",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Checkbox",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "날짜",
   "custom-field-dropdown": "Dropdown List",
   "custom-field-dropdown-none": "(none)",

+ 2 - 0
i18n/lv.i18n.json

@@ -256,6 +256,8 @@
   "current": "current",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Checkbox",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Date",
   "custom-field-dropdown": "Dropdown List",
   "custom-field-dropdown-none": "(none)",

+ 2 - 0
i18n/mk.i18n.json

@@ -256,6 +256,8 @@
   "current": "сегашен",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Чекбокс",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Дата",
   "custom-field-dropdown": "Падащо меню",
   "custom-field-dropdown-none": "(няма)",

+ 2 - 0
i18n/mn.i18n.json

@@ -256,6 +256,8 @@
   "current": "current",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Checkbox",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Date",
   "custom-field-dropdown": "Dropdown List",
   "custom-field-dropdown-none": "(none)",

+ 2 - 0
i18n/nb.i18n.json

@@ -256,6 +256,8 @@
   "current": "current",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Checkbox",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Dato",
   "custom-field-dropdown": "Dropdown List",
   "custom-field-dropdown-none": "(none)",

+ 2 - 0
i18n/nl.i18n.json

@@ -256,6 +256,8 @@
   "current": "Huidige",
   "custom-field-delete-pop": "Er is geen herstelmogelijkheid. Deze actie zal dit maatwerkveld van alle kaarten verwijderen en de bijbehorende historie wissen.",
   "custom-field-checkbox": "Checkbox",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Datum",
   "custom-field-dropdown": "Dropdown Lijst",
   "custom-field-dropdown-none": "(geen)",

+ 2 - 0
i18n/oc.i18n.json

@@ -256,6 +256,8 @@
   "current": "actual",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Casa de croiar",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Data",
   "custom-field-dropdown": "Tièra de causidas",
   "custom-field-dropdown-none": "(pas res)",

+ 2 - 0
i18n/pl.i18n.json

@@ -256,6 +256,8 @@
   "current": "obecny",
   "custom-field-delete-pop": "Nie ma możliwości wycofania tej operacji. To usunie te niestandardowe pole ze wszystkich kart oraz usunie ich całą historię.",
   "custom-field-checkbox": "Pole wyboru",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Data",
   "custom-field-dropdown": "Lista rozwijana",
   "custom-field-dropdown-none": "(puste)",

+ 2 - 0
i18n/pt-BR.i18n.json

@@ -256,6 +256,8 @@
   "current": "atual",
   "custom-field-delete-pop": "Não existe desfazer. Isso irá excluir o campo customizado de todos os cartões e destruir seu histórico",
   "custom-field-checkbox": "Caixa de seleção",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Data",
   "custom-field-dropdown": "Lista suspensa",
   "custom-field-dropdown-none": "(nada)",

+ 2 - 0
i18n/pt.i18n.json

@@ -256,6 +256,8 @@
   "current": "actual",
   "custom-field-delete-pop": "Não existe desfazer. Isto irá remover este campo personalizado de todos os cartões e destruir o seu histórico",
   "custom-field-checkbox": "Caixa de selecção",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Data",
   "custom-field-dropdown": "Lista Suspensa",
   "custom-field-dropdown-none": "(nada)",

+ 2 - 0
i18n/ro.i18n.json

@@ -256,6 +256,8 @@
   "current": "current",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Checkbox",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Date",
   "custom-field-dropdown": "Dropdown List",
   "custom-field-dropdown-none": "(none)",

+ 2 - 0
i18n/ru.i18n.json

@@ -256,6 +256,8 @@
   "current": "текущий",
   "custom-field-delete-pop": "Отменить нельзя. Это удалит настраиваемое поле со всех карт и уничтожит его историю.",
   "custom-field-checkbox": "Галочка",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Дата",
   "custom-field-dropdown": "Выпадающий список",
   "custom-field-dropdown-none": "(нет)",

+ 2 - 0
i18n/sl.i18n.json

@@ -256,6 +256,8 @@
   "current": "trenutno",
   "custom-field-delete-pop": "Razveljavitve ni. To bo odstranilo to poljubno polje iz vseh kartic in izbrisalo njegovo zgodovino.",
   "custom-field-checkbox": "Potrditveno polje",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Datum",
   "custom-field-dropdown": "Spustni seznam",
   "custom-field-dropdown-none": "(nobeno)",

+ 2 - 0
i18n/sr.i18n.json

@@ -256,6 +256,8 @@
   "current": "current",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Checkbox",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Datum",
   "custom-field-dropdown": "Padajuća lista",
   "custom-field-dropdown-none": "(ništa)",

+ 2 - 0
i18n/sv.i18n.json

@@ -256,6 +256,8 @@
   "current": "aktuell",
   "custom-field-delete-pop": "Det går inte att ångra. Detta tar bort det här anpassade fältet från alla kort och förstör dess historia.",
   "custom-field-checkbox": "Kryssruta",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Datum",
   "custom-field-dropdown": "Rullgardingsmeny",
   "custom-field-dropdown-none": "(inga)",

+ 2 - 0
i18n/sw.i18n.json

@@ -256,6 +256,8 @@
   "current": "current",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Checkbox",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Date",
   "custom-field-dropdown": "Dropdown List",
   "custom-field-dropdown-none": "(none)",

+ 2 - 0
i18n/ta.i18n.json

@@ -256,6 +256,8 @@
   "current": "current",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Checkbox",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "நாள் ",
   "custom-field-dropdown": "Dropdown List",
   "custom-field-dropdown-none": "(none)",

+ 2 - 0
i18n/th.i18n.json

@@ -256,6 +256,8 @@
   "current": "ปัจจุบัน",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Checkbox",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "วันที่",
   "custom-field-dropdown": "Dropdown List",
   "custom-field-dropdown-none": "(none)",

+ 2 - 0
i18n/tr.i18n.json

@@ -256,6 +256,8 @@
   "current": "mevcut",
   "custom-field-delete-pop": "Bunun geri dönüşü yoktur. Bu özel alan tüm kartlardan kaldırılıp tarihçesi yokedilecektir.",
   "custom-field-checkbox": "İşaret kutusu",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Tarih",
   "custom-field-dropdown": "Açılır liste",
   "custom-field-dropdown-none": "(hiçbiri)",

+ 2 - 0
i18n/uk.i18n.json

@@ -256,6 +256,8 @@
   "current": "current",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Checkbox",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Date",
   "custom-field-dropdown": "Dropdown List",
   "custom-field-dropdown-none": "(none)",

+ 2 - 0
i18n/vi.i18n.json

@@ -256,6 +256,8 @@
   "current": "current",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Checkbox",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Date",
   "custom-field-dropdown": "Dropdown List",
   "custom-field-dropdown-none": "(none)",

+ 2 - 0
i18n/zh-CN.i18n.json

@@ -256,6 +256,8 @@
   "current": "当前",
   "custom-field-delete-pop": "没有撤销,此动作将从所有卡片中移除自定义字段并销毁历史。",
   "custom-field-checkbox": "选择框",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "日期",
   "custom-field-dropdown": "下拉列表",
   "custom-field-dropdown-none": "(无)",

+ 2 - 0
i18n/zh-HK.i18n.json

@@ -256,6 +256,8 @@
   "current": "current",
   "custom-field-delete-pop": "There is no undo. This will remove this custom field from all cards and destroy its history.",
   "custom-field-checkbox": "Checkbox",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "Date",
   "custom-field-dropdown": "Dropdown List",
   "custom-field-dropdown-none": "(none)",

+ 2 - 0
i18n/zh-TW.i18n.json

@@ -256,6 +256,8 @@
   "current": "目前",
   "custom-field-delete-pop": "此操作將會從所有卡片中移除自訂欄位以及銷毀歷史紀錄,並且無法撤消。",
   "custom-field-checkbox": "複選框",
+  "custom-field-currency": "Currency",
+  "custom-field-currency-option": "Currency Code",
   "custom-field-date": "日期",
   "custom-field-dropdown": "下拉式選單",
   "custom-field-dropdown-none": "(無)",

+ 5 - 1
models/customFields.js

@@ -22,7 +22,7 @@ CustomFields.attachSchema(
        * type of the custom field
        */
       type: String,
-      allowedValues: ['text', 'number', 'date', 'dropdown'],
+      allowedValues: ['text', 'number', 'date', 'dropdown', 'currency'],
     },
     settings: {
       /**
@@ -30,6 +30,10 @@ CustomFields.attachSchema(
        */
       type: Object,
     },
+    'settings.currencyCode': {
+      type: String,
+      optional: true,
+    },
     'settings.dropdownItems': {
       /**
        * list of drop down items objects