Skip to content
This repository was archived by the owner on Apr 5, 2018. It is now read-only.

Export: invalid csv file due to unwanted 'translations' from plugins #21

Open
malamoet opened this issue Jun 18, 2017 · 0 comments
Open

Comments

@malamoet
Copy link

Hi,

I was trying the export/import functionality of the plugin but the import kept failing. After some digging I found out that it had to do with invalid data in the (generated) csv file. This was caused by some entries in the translation list retrieved from plugin files, like this:

  • AmNav.js (line:279 / plugin:amnav)

    • Code:
      var $elementContainer = this.$container.find('.amnav__node[data-id="'+parentId+'"]').closest('li'),
    • Results in the following translation entry:
      • Original: .amnav__node[data-id="
      • Translation: .amnav__node[data-id="
  • color.html (line:15 / plugin:amforms)

    • Code:
      {%- includejs 'new Craft.ColorPicker("'~(id|namespaceInputId)~'");' %}
    • Results in the following translation entry:
      • Original: new Craft.ColorPicker("
      • Translation: new Craft.ColorPicker("

So obviously the generated entries aren't exactly translations, so I don't understand why they are added to the translation list. As it says in this translate plugin documentation, only Craft::t(), Craft.t() and ""|t() should be read and manageable through the translate plugin.

Could someone look into this please?
Thx in advance,

Just a thought, but isn't it 'safer' to just use the language files provided (if provided off course) by the plugin itself instead of scanning the plugin files for translations? In this example both amnav & amforms have specific translations files, so why don't make use of those?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant