We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28432
    • 372 Posts
    Hello,

    I found some errors in the lexicon for French.

    $_lang['mig_noitems'] = 'Aucun élément trouvé';
    $_lang['mig_add'] = 'Ajouter un élément';
    $_lang['mig_remove_confirm'] = 'Êtes-vous sûr de vouloir supprimer cet élément ?';
    $_lang['mig_edit'] = 'Éditer';
    $_lang['mig_remove'] = 'Supprimer';
    $_lang['mig_duplicate'] = 'Dupliquer';
    $_lang['mig_preview'] = 'Preview';
    $_lang['mig_save_resource'] = 'Before adding new items, you have to save this resource!';
    $_lang['mig_save_resource'] = 'Before adding new items, you have to save this resource!';
    
    $_lang['mig_show_trash'] = 'Trash View';
    $_lang['mig_show_normal'] = 'Normal View';
    
    $_lang['mig_loadgrid'] = 'load grid';
    
    $_lang['migx.create'] = 'Créer';
    $_lang['migx.publish'] = 'Publier';
    $_lang['migx.unpublish'] = 'Dépublier';
    $_lang['migx.delete'] = 'Delete';
    $_lang['migx.actions'] = 'Actions';
    $_lang['migx.bulk_actions'] = 'Actions groupées';
    $_lang['migx.publish_selected'] = 'Publier la sélection';
    $_lang['migx.unpublish_selected'] = 'Dépublier la sélection';
    $_lang['migx.delete_selected'] = 'Supprimer la sélection';
    $_lang['migx.remove_selected'] = 'Enlever la sélection';
    $_lang['migx.export_current_view'] = 'Export Current View';
    $_lang['migx.recall'] = 'Recall';
    $_lang['migx.remove'] = 'Remove';
    $_lang['migx.new'] = 'nouveau';
    $_lang['month'] = 'Mois';
    $_lang['year'] = 'Année';


    As you can see there is mig_noitems instead of migx.noitems.
    Right click was in english, as you can see in my picture in attachement (migx-lang-fr.jpg).

    The second thing is that we need simple quote to write in french.
    So if i had to translate this :
    $_lang['migx.remove_confirm'] = 'Remove Item?';


    I have to write : Supprimer l'élément ?
    $_lang['migx.remove_confirm'] = 'Supprimer l'élément ?';


    So i try to change simple quote to double quote and the manager crash. I try to put \ (back slach) before simple quote to escape, and manager crash as well.

    BackSlash work with lexicon but not in Migx lexicon, I have done another component with this in the lexicon and it work :
    $_lang['form_error_message'] = 'Une erreur de validation de formulaire est survenu. S\'il vous plaît vérifier les valeurs que vous avez saisies.';


    Thanks in advance.

    This question has been answered by Bruno17. See the first response.

    [ed. note: Steeve last edited this post 10 years, 9 months ago.]
    • discuss.answer
      • 4172
      • 5,888 Posts
      try this:
      fix that line:
      https://github.com/Bruno17/MIGX/commit/2eb9c5ad2ef5dad28e313d01575574692e83d413#diff-a42e4e564a495d18172aeb7725cbc240R463

      and try it this way:
      $_lang['migx.remove_confirm'] = "Supprimer l\\'élément ?";
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 28432
        • 372 Posts
        Hello Bruno,

        I've changed this in core/components/migx/elements/tv/migx.tpl :
        var lang = '{/literal}{$migx_lang}{literal}';

        to
        var lang = {/literal}{$migx_lang}{literal};


        And this in core/components/migx/model/migx/migx.class.php :
        $columnrenderoptions[$column['dataIndex']][$option[$indexfield]] = $format == 'json' ? $this->modx->toJson($option) : $option;

        to
        if (isset($option[$indexfield])) {
                            	    $columnrenderoptions[$column['dataIndex']][$option[$indexfield]] = $format == 'json' ? $this->modx->toJson($option) : $option;
                                }


        And in the lexicon double quote instead of simple where in need simple quote in the text. And double back slash before the simple quote in the text to escape.
        $_lang['migx.remove_confirm'] = "Supprimer l\\'élément ?";


        @bruno : i can send you the entire lexicon translate in french if you want ?

        This work like a charm.
        Many thanks Bruno.
          • 4172
          • 5,888 Posts
          you could also send a pull-request at github with the lexicon-entries
          there are some new entries now, see the current en-file
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 28432
            • 372 Posts
            Quote from: Bruno17 at Jan 12, 2016, 07:10 AM
            you could also send a pull-request at github with the lexicon-entries
            there are some new entries now, see the current en-file

            Done !
              • 4172
              • 5,888 Posts
              hmm..
              I can see you fork and your patches in two new branches
              https://github.com/AW2C/MIGX/tree/patch-2

              but not a pull-request:
              https://github.com/Bruno17/MIGX/pulls

              and you don't need to create a new branch for each commit.
              For MIGX, you can just commit against the master-branch. Thats ok for me.
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 28432
                • 372 Posts
                Sorry Bruno ! I'm not familiar with Github.
                So i have normally commit to the master branch now ?!
                  • 4172
                  • 5,888 Posts
                  for MIGX, yes.
                  And do a pull-request then.
                    -------------------------------

                    you can buy me a beer, if you like MIGX

                    http://webcmsolutions.de/migx.html

                    Thanks!
                    • 28432
                    • 372 Posts
                    Done (normally) ?!
                      • 4172
                      • 5,888 Posts
                      thanks, Steeve!
                        -------------------------------

                        you can buy me a beer, if you like MIGX

                        http://webcmsolutions.de/migx.html

                        Thanks!