i18next-gettext-converter icon indicating copy to clipboard operation
i18next-gettext-converter copied to clipboard

Conversion errors

Open akougblenou opened this issue 7 years ago • 4 comments

I have notice that I had few conversion issues when using the converter and it might have to do with the architecture of my json.

My json looks like this:

{
  "title": "Table",
  "link_column": "Number/Reference",
  "state_column": "State",
  "type_column": "Type",
  "offer_column": "Offer",
  "date_column": "Creation Date",
  "state_types": [
    {"state": "Connected"},
    {"state": "Disconnected"},
    {"state": "Stalled"},
    {"state": "Unknown"}
  ],
  "type_types": [
    {"type": "ADSL"},
    {"type": "VDSL"},
    {"type": "SDSL"},
    {"type": "FIBER"},
    {"type": "SHARED_FIBER"}
  ]
}

The civilities (not sure if that is a real word) is used for dropdown purposes and as a result, I get this output:

msgid ""
msgstr ""
"Project-Id-Version: i18next-conv\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2017-06-13T09:50:07.336Z\n"
"PO-Revision-Date: 2017-06-13T09:50:07.336Z\n"
"Language: en\n"

msgid "title"
msgstr "Table"

msgctxt "column"
msgid "link"
msgstr "Number/Reference"

msgctxt "column"
msgid "state"
msgstr "State"

msgctxt "column"
msgid "type"
msgstr "Type"

msgctxt "column"
msgid "offer"
msgstr "Offer"

msgctxt "column"
msgid "date"
msgstr "Creation Date"

msgctxt "types"
msgid "state"
msgstr ""
"[object Object]\n"
"[object Object]\n"
"[object Object]\n"
"[object Object]"

msgctxt "types"
msgid "type"
msgstr ""
"[object Object]\n"
"[object Object]\n"
"[object Object]\n"
"[object Object]\n"
"[object Object]"

Is this type of formatting not possible at all ?

akougblenou avatar Jun 13 '17 09:06 akougblenou

Sorry for the late reply. Would accept a pull request.

jamuhl avatar Jun 18 '17 16:06 jamuhl

@AKFourSeven I missed this, I'll check your PR if you send it :D

perrin4869 avatar Jun 19 '17 02:06 perrin4869

By sending a pull request you imply that this is not possible as it with the current version of gettext-converter ?

akougblenou avatar Jun 19 '17 14:06 akougblenou

Yeah, seems so =/ Not sure exactly how to handle this though, leave this up to you if you wanna implement this feature

perrin4869 avatar Sep 03 '17 09:09 perrin4869