• Love your plugin. Not so with 2.x version… Although the user interface looks better, the real task, finding the pot files and translation files – already made with the 1.x version are not found. Tried 2.0 and 2.02 and went back to the old version.
    How to install 2.x AND be able to find and use the already available translations…?
    After installation the plugin finds some parts: it reads the file produced by the 1.x version only. I know because my translation was only 72% and now it says 100% and all not-translated strings are not there.
    Help!

    https://wordpress.org/plugins/loco-translate/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Tim W

    (@timwhitlock)

    The new plugin deliberately avoids showing files that may not work. If yours worked before, it was probably by luck rather than by design. i.e. your bundle was probably set up in a non-standard way, but Loco’s guess work happened to be correct.

    Version 2 doesn’t make guesses. 700 support requests demonstrates that letting the plugin guess where files should be saved was a very bad idea. Having said that, I will look at adding the ability to edit existing [but unknown] files.

    So in answer to your question – to translate a non-standard bundle you’ll have to tell Loco how it’s setup. I can help if you can post a link to your bundle.

    If you’re going to try configuring it yourself, here’s the docs: https://localise.biz/wordpress/plugin/manual/bundle-config

    Thread Starter basbuis

    (@basbuis)

    Not sure how to post a link to a bundle… (or what a bundle is. in wp terms..)

    Have a lot of information:

    Open string in version 2.0:
    http://nederlofacademie.nl/wp-admin/admin.php?path=plugins%2Fwp-courseware%2Flanguage%2Fwp_courseware-nl_NL.mo&bundle=wp-courseware%2Fwp-courseware.php&domain=wp_courseware&page=loco-plugin&action=file-info

    New open string version 2.x – by line:
    http://nederlofacademie.nl/wp-admin/admin.php?path=plugins%2Fwp-courseware%2Flanguage%2Fwp_courseware-nl_NL.mo
    &bundle=wp-courseware%2Fwp-courseware.php
    &domain=wp_courseware
    &page=loco-plugin&action=file-info

    1) locatie en naam bestand mo
    2) locatie en naam bestand plugin php
    3) ?
    4) pagina Translate Loco waar deze informatie getoond wordt

    Old open string version 1.x – by line:
    http://nederlofacademie.nl/wp-admin/admin.php?name=wp-courseware/wp-courseware.php
    &type=plugin
    &poedit=plugins/wp-courseware/languages/wp-courseware-nl_NL.po
    &page=loco-translate

    Note:
    Both strings are asking for different things.

    WP Courseware:
    textdomain (PHP file): wp_courseware
    name plugin PHP: wp-courseware.php (= different)
    POT: default.pot
    PO: wp-courseware-nl_NL.po
    MO: wp-courseware-nl_NL.mo

    Entered information / setup in version 2.x:
    Project name: WP-Courseware
    Text domain: wp_courseware
    File prefix: tried wp_courseware and wp-courseware and blank
    Template name: ?
    Domain path: /wordpress/current/wp-content/plugins/wp-courseware/language
    Source file paths: don’t know what that is…

    Only result: No translation files found

    Location files: (screenshot FTP)
    http://nederlofacademie.nl/wp-content/uploads/2016/08/Files.png

    I can give you acces to the site, but might not be a good plan to post it here…

    Regards,
    Bas

    Thread Starter basbuis

    (@basbuis)

    and another screenshot of Translate Lofco 2.0 not finding original pot file

    http://nederlofacademie.nl/wp-content/uploads/2016/08/instellingen-loco-2.0.png

    Plugin Author Tim W

    (@timwhitlock)

    The bundle is [in your case] the wp courseware plugin.

    If you post a download link to it, I will provide you with a configuration you can use.

    regarding your screenshot of the missing file. It is not a missing pot file. It’s telling you there is a binary MO file without a corresponding PO file. If the author has provided MO files without PO files, then it’s because they don’t want you to edit them.

    Thread Starter basbuis

    (@basbuis)

    There is a pot file, default.pot (as in file view ftp screenshot)

    Thread Starter basbuis

    (@basbuis)

    Hi,

    this is the link to the plugin (zip file)

    https://www.dropbox.com/s/4ur2ex71dmzzq6s/wp-courseware-3.9-2.zip?dl=0

    Thread Starter basbuis

    (@basbuis)

    And yes, having the configuration would make me really really happy!

    Thanks,
    Bas

    Plugin Author Tim W

    (@timwhitlock)

    I am looking at your download now

    re:

    There is a pot file, default.pot (as in file view ftp screenshot)

    This has nothing do with your *.pot file. Every translation file is actually a pair. *.po and *.mo. That is what it is telling you – that the *.po is missing.

    Thread Starter basbuis

    (@basbuis)

    Do understand your request now:
    (there is a PO file and a MO file)

    you want the bundle as it is installed… Not the original.

    This is how it is now:
    with a directory called language (use by plugin.wp)
    and a directory languages used by me and your plugin.
    Once finished translating we copy the .mo file to language and change – to _.

    LINK:
    https://www.dropbox.com/s/wlbdj2w90f264k2/wp-courseware.zip?dl=0

    Plugin Author Tim W

    (@timwhitlock)

    The following XML config works for WP Courseware

    <?xml version="1.0" encoding="utf-8"?>
    <bundle name="WP Courseware">
      <domain name="wp_courseware">
        <project name="WP Courseware" slug="wp_courseware">
          <source>
            <directory>.</directory>
            <exclude>
              <directory>language</directory>
            </exclude>
          </source>
          <target>
            <directory>language</directory>
          </target>
          <template>
            <file>language/default.pot</file>
          </template>
        </project>
      </domain>
      <exclude>
        <directory>css</directory>
        <directory>js</directory>
        <directory>image</directory>
      </exclude>
    </bundle>

    Click the Setup tab, then “import config from XML”

    I’m going to look at showing ALL files in bundles so you can edit anything, but it will continue to be a problem when authors use non-standard names like default.pot. If they’d use wp_courseware.pot we wouldn’t be having this conversation. The old version 1.x used to guess that default.pot was the right file, but that proved to only result in confused people when the guess was in fact wrong. Version 2.x will continue to require configuration to reduce these mistakes.

    Plugin Author Tim W

    (@timwhitlock)

    FYI: The current development version contains the ability to edit unconfigured files.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘2.x version not so simple as 1.x: cannot find existing translations anymore’ is closed to new replies.