How to simplify Freepbx GUI interface?

Hi Andrew!

I have two colleagues which speak Arabic (it’s not their primary native language though, for one of them it’s Berber and the other I am not quite sure what it is exactly but it’s not Arabic or at least not Standard Arabic…).

Neither of them speak Persian which is the RTL language in FreePBX with the most translations…

I will check if one of them could help at least have a general idea of what is wrong…

It’s easy to spot problems with the dashboard (Statistics and System Overview definitely have problems and with modules which are not translated (the period, colons, etc… get put in front of an English sentence) when you switch to Persian but I will try to have those confirmed as issues and what would be the best fix by one of them…

I will try to make a list (or make a push request if I can fix them) of modules which have strings which are concatenated since those affect both RTL and LTR (when the word order is different from English).

I will keep you posted…

Have a nice day!

Nick

i translated some strings in admin module,voicemail and announcement module.
i have compiled them and i have created amp.mo, announcement.mo and voicemail.mo files. My language is displayed right side of the menu inside of the languages and i click my language thus nothing will be displayed. In Firefox empty /admin/config.php page was displayed.
I must modify these line of codes in /var/www/html/admin/views/menu.php
<<?php if($amp_conf['SHOWLANGUAGE']) { ?>




    • <?php foreach ($language as $langKey => $lang) {
      $class = ‘’;
      if ($langKey === $_COOKIE[‘lang’]) {
      $class = ‘class=“disabled”’;
      } ?>
      <li <?php echo $class; ?> data-lang="<?php echo $langKey; ?>"><?php echo $lang; ?>

  • <?php } ?>


    <?php } ?>
    />

    When i choose other default added languages from dropdown menu so page is NOT translated to any language but same page loading again(Not empty page). But when i choose recently added language so empty admin/views/menu.php page is diplayed but i cant connect to freepbx again.
    1-what am i doing mistake in new added language?
    2-When i click other languages why page does not translated to these languages?

    Anyone can help me?i tried all of the languages.But none of them displayed on the main page.

    You have to translate Framework for any of this to work. Skipping framework and going to a simpler module just makes FreePBX ignore your work because nothing is in framework for that language.

    As for other languages not working. You’ve now modified your system so who knows. You could have broken the whole thing.

    I have not changed anything in .php files.
    I have not changed anything in other languages i18n folders.
    So what can be problem in settings of other languages ?

    Being an open source project it is desirable to have people give back. Many do that through support on these forums. Some through code and documentation submissions. Some through translations. In some cases people are rock stars and do several of these.

    We have staff that translate Spanish and French. Other contributors maintain other languages.
    If you are going to go through the effort of translation it is better to use the official tools.

    • This benefits the entire community
    • This ensures your translations survive updates
    • This makes it easier to find and update new strings as they are added.

    So I would recommend visiting https://wiki.freepbx.org/display/FOP/Translating+FreePBX+with+Weblate

    1 Like

    I have to translate whole field in framework ?
    If I don’t translate some of the fields so how does behave freepbx? Does it copy msgid strings which are not translated and paste it to msgstr fields?

    Untranslated strings show up in english.

    Thanks so much. Tomorrow I will try your advices and I will write results here.

    There is not any i18n folder inside of the /var/www/html/admin/modules/framework/
    If you meant /var/www/html/admin as a Framework so i have already translated.

    What i am missing?

    When i select one of the default inserted languages (es_ES selected) debug info:

    OUT > [2017-May-26 10:11:35] [WARNING] (BMO/Notifications.class.php:507) - [NOTIFICATION]-[framework]-[LANG_INVALID2] - Invalid Language (You have selected an invalid language ‘es_ES’ and we were unable to fallback to ‘en_US’ or ‘en_US.utf8’ please resolve this in advanced settings [Nonexistent in Locale, Missing en_US])
    OUT > [2017-May-26 10:11:36] [NOTICE] (BMO/Notifications.class.php:507) - [NOTIFICATION]-[core]-[MEMLIMIT] - Memory Limit Changed (Your memory_limit, 128M, is set too low and has been increased to 256M. You may want to change this in you php.ini config file)
    OUT > [2017-May-26 10:11:44] [WARNING] (BMO/Notifications.class.php:507) - [NOTIFICATION]-[framework]-[LANG_INVALID2] - Invalid Language (You have selected an invalid language ‘es_ES’ and we were unable to fallback to ‘en_US’ or ‘en_US.utf8’ please resolve this in advanced settings [Nonexistent in Locale, Missing en_US])
    OUT > [2017-May-26 10:11:44] [WARNING] (BMO/Notifications.class.php:507) - [NOTIFICATION]-[framework]-[LANG_INVALID2] - Invalid Language (You have selected an invalid language ‘es_ES’ and we were unable to fallback to ‘en_US’ or ‘en_US.utf8’ please resolve this in advanced settings [Nonexistent in Locale, Missing en_US])
    OUT > [2017-May-26 10:11:45] [WARNING] (BMO/Notifications.class.php:507) - [NOTIFICATION]-[framework]-[LANG_INVALID2] - Invalid Language (You have selected an invalid language ‘es_ES’ and we were unable to fallback to ‘en_US’ or ‘en_US.utf8’ please resolve this in advanced settings [Nonexistent in Locale, Missing en_US])
    OUT > [2017-May-26 10:11:45] [WARNING] (BMO/Notifications.class.php:507) - [NOTIFICATION]-[framework]-[LANG_INVALID2] - Invalid Language (You have selected an invalid language ‘es_ES’ and we were unable to fallback to ‘en_US’ or ‘en_US.utf8’ please resolve this in advanced settings [Nonexistent in Locale, Missing en_US])
    OUT > [2017-May-26 10:11:45] [WARNING] (BMO/Notifications.class.php:507) - [NOTIFICATION]-[framework]-[LANG_INVALID2] - Invalid Language (You have selected an invalid language ‘es_ES’ and we were unable to fallback to ‘en_US’ or ‘en_US.utf8’ please resolve this in advanced settings [Nonexistent in Locale, Missing en_US])
    [2017-May-26 10:11:45] [WARNING] (BMO/Notifications.class.php:507) - [NOTIFICATION]-[framework]-[LANG_INVALID2] - Invalid Language (You have selected an invalid language ‘es_ES’ and we were unable to fallback to ‘en_US’ or ‘en_US.utf8’ please resolve this in advanced settings [Nonexistent in Locale, Missing en_US])
    OUT > [2017-May-26 10:11:45] [WARNING] (BMO/Notifications.class.php:507) - [NOTIFICATION]-[framework]-[LANG_INVALID2] - Invalid Language (You have selected an invalid language ‘es_ES’ and we were unable to fallback to ‘en_US’ or ‘en_US.utf8’ please resolve this in advanced settings [Nonexistent in Locale, Missing en_US])
    OUT > [2017-May-26 10:11:46] [WARNING] (BMO/Notifications.class.php:507) - [NOTIFICATION]-[framework]-[LANG_INVALID2] - Invalid Language (You have selected an invalid language ‘es_ES’ and we were unable to fallback to ‘en_US’ or ‘en_US.utf8’ please resolve this in advanced settings [Nonexistent in Locale, Missing en_US])

    But when i clicked new inserted language link so i cant see any debug logs on the screen. Only while empty web page is displayed.

    You don’t have i18n installed on your system.

    Also. I18n exists in framework. Just not in the normal location. Search it and you will find it.

    Andrew, i suppose i know the guy and also i can help on that. I think beside translation, CSS issues are one of the concerns. For example as soon as choosing an RTL you can see in dashboard page that icons mix with texts and you can feel some misplaced items.

    So can you give a hint on how to start with CSS manipulation for RTL?

    i have found these directories:
    root@as:/var/www/html/admin/libraries# find / -type d -name ‘i18n’
    /var/www/html/admin/modules/logfiles/i18n
    /var/www/html/admin/modules/callrecording/i18n
    /var/www/html/admin/modules/customappsreg/i18n
    /var/www/html/admin/modules/music/i18n
    /var/www/html/admin/modules/sipsettings/i18n
    /var/www/html/admin/modules/dashboard/i18n
    /var/www/html/admin/modules/featurecodeadmin/i18n
    /var/www/html/admin/modules/userman/i18n
    /var/www/html/admin/modules/recordings/i18n
    /var/www/html/admin/modules/soundlang/i18n
    /var/www/html/admin/modules/infoservices/i18n
    /var/www/html/admin/modules/cdr/i18n
    /var/www/html/admin/modules/ucp/i18n
    /var/www/html/admin/modules/announcement/i18n
    /var/www/html/admin/modules/conferences/i18n
    /var/www/html/admin/modules/cel/i18n
    /var/www/html/admin/modules/voicemail/i18n
    /var/www/html/admin/i18n
    /usr/share/doc/libx11-dev/i18n
    /usr/share/i18n
    /usr/local/XSGX/share/doc/libX11/i18n
    /usr/src/freepbx/amp_conf/htdocs/admin/modules/logfiles/i18n
    /usr/src/freepbx/amp_conf/htdocs/admin/modules/callrecording/i18n
    /usr/src/freepbx/amp_conf/htdocs/admin/modules/customappsreg/i18n
    /usr/src/freepbx/amp_conf/htdocs/admin/modules/music/i18n
    /usr/src/freepbx/amp_conf/htdocs/admin/modules/sipsettings/i18n
    /usr/src/freepbx/amp_conf/htdocs/admin/modules/dashboard/i18n
    /usr/src/freepbx/amp_conf/htdocs/admin/modules/featurecodeadmin/i18n
    /usr/src/freepbx/amp_conf/htdocs/admin/modules/userman/i18n
    /usr/src/freepbx/amp_conf/htdocs/admin/modules/recordings/i18n
    /usr/src/freepbx/amp_conf/htdocs/admin/modules/soundlang/i18n
    /usr/src/freepbx/amp_conf/htdocs/admin/modules/infoservices/i18n
    /usr/src/freepbx/amp_conf/htdocs/admin/modules/cdr/i18n
    /usr/src/freepbx/amp_conf/htdocs/admin/modules/ucp/i18n
    /usr/src/freepbx/amp_conf/htdocs/admin/modules/conferences/i18n
    /usr/src/freepbx/amp_conf/htdocs/admin/modules/cel/i18n
    /usr/src/freepbx/amp_conf/htdocs/admin/modules/voicemail/i18n
    /usr/src/freepbx/amp_conf/htdocs/admin/i18n

    Now please can you tell me which directories have to be translated?

    This one is for framework. All of the rest are in other modules. You still need to install i18n on your system. You should be using the distro and weblate. Since you’ve chosen not to do so you have ended up making this process extremely complex.

    There is an RTL css file in the css folder in admin/assets/css. This should probably be less.

    Good, will take a look over the long weekend

    What is the reason of this message on the main page of the FreePBX notification message box?

    Invalid language:
    “You have selected an invalid language ‘it_IT’ and we were unable to fallback to ‘en_US’ or ‘en_US.utf8’ please resolve this in advanced settings [Nonexistent in Locale, Missing en_US]”

    How can i fix it?–>I have fixed that problem. it was about locale
    Default added languages are working now. Now i have only one problem. New inserted language has problem.

    i think there is a some secret points inside of the code. Who wants to help me in this secret point : )??

    Maybe I need to install some scripts after create a new language directory inside of the /var/www/html/admin/i18n/
    and inside of the /var/www/html/admin/modules/module_name/i18n/

    If the code is in “plain text” , what do you think might be “secret” about it?

    Secret is not code, secret is finding solution in this code.
    When I copy my new created amp.mo file to any existing languages in the admin/i18n/ directory so I can see my words and sentences on Freepbx main page.But when Created new language directory same amp.mo can’t be displayed on the main page.
    Where does Freepbx look up new inserted language e directory name ?freepbx is looking up this xx_XX directory name in a specific directory ?