Language Maintenance script

Discussion in 'Developers' Forum' started by Mark_NL, Sep 13, 2011.

  1. Mark_NL

    Mark_NL New Member

    We should make some sort of language maintenance tool.
    I notice that keeping all those language files up to date can be a b*tch.
    When you add one new string, you need to manually go through all the language files and add one line.

    All files have (read: should have) the same variables defined with a translation (or at least in english), so it should be not that hard to have a script run through them and add/edit/delete the specified variable.

    I'm thinking of a cli script, included in the svn as dev tool.
     
  2. till

    till Super Moderator

    There is already such a script available in the ispconfig interface and I use it regularily to keep languages in svn up to date. See System > Language Editor > Merge. You have to add strings only to the 'en' lang file, dont add strings to other langiages directly.
     
  3. Mark_NL

    Mark_NL New Member

    Holy cow!
    Why have i completely overlooked that option!! :)

    So the way to work is:

    f.e.

    1. edit: /usr/local/ispconfig/interface/web/admin/lib/lang/en_server_ip_list.lng directly, adding a new string.
    2. go to: System > Language Editor > Merge
    3. select a language
    4. click merge

    nice! Though, to bad you can't merge all language at the same time :(

    Code:
    Added 1 lines to the file /usr/local/ispconfig/interface/web/vm/lib/lang/ja_openvz_ostemplate_list.lng
    File does not exist yet. Copied file /usr/local/ispconfig/interface/web/vm/lib/lang/en_openvz_action.lng to /usr/local/ispconfig/interface/web/vm/lib/lang/ja_openvz_action.lng
    Added 3 lines to the file /usr/local/ispconfig/interface/web/client/lib/lang/ja_client.lng
    Added 3 lines to the file /usr/local/ispconfig/interface/web/client/lib/lang/ja_reseller.lng
    Added 1 lines to the file /usr/local/ispconfig/interface/web/client/lib/lang/ja_clients_list.lng
    Added 5 lines to the file /usr/local/ispconfig/interface/web/client/lib/lang/ja_client_template.lng
    Added 1 lines to the file /usr/local/ispconfig/interface/web/mail/lib/lang/ja_mail_get.lng
    Added 1 lines to the file /usr/local/ispconfig/interface/web/monitor/lib/lang/ja.lng
    Added 2 lines to the file /usr/local/ispconfig/interface/web/admin/lib/lang/ja.lng
    Removed 2 lines to the file /usr/local/ispconfig/interface/web/admin/lib/lang/ja.lng
    Added 2 lines to the file /usr/local/ispconfig/interface/web/admin/lib/lang/ja_server_config.lng
    File does not exist yet. Copied file /usr/local/ispconfig/interface/web/admin/lib/lang/en_iptables.lng to /usr/local/ispconfig/interface/web/admin/lib/lang/ja_iptables.lng
    Added 4 lines to the file /usr/local/ispconfig/interface/web/admin/lib/lang/ja_server_ip_list.lng
    File does not exist yet. Copied file /usr/local/ispconfig/interface/web/admin/lib/lang/en_iptables_list.lng to /usr/local/ispconfig/interface/web/admin/lib/lang/ja_iptables_list.lng
    Added 3 lines to the file /usr/local/ispconfig/interface/web/admin/lib/lang/ja_server_ip.lng
    There's some updating to do! ;)
     
  4. till

    till Super Moderator

    But please add this only as option, as it is not always a good choice to merge all languages at once ;)
     

Share This Page