From d1ab8b425602140e3d4bc8e26650cc13ca3bd5f6 Mon Sep 17 00:00:00 2001 From: Brian Read Date: Thu, 13 Jun 2024 16:38:25 +0100 Subject: [PATCH] Add code to use OpenAI API to do transalations --- Targets/Nfsshare-Custom.pm | 2 +- Targets/Nfsshare-Custom.pm.new | 4 +- Targets/Nfsshare.pm | 15 +- Targets/_nfs_PARAMS.html.ep | 10 +- Targets/_nfs_TABLE.html.ep | 28 +- .../{Nfsshare.html.ep => nfsshare.html.ep} | 2 +- Targets/nfsshare_bg.lex | 28 + Targets/nfsshare_da.lex | 28 + Targets/nfsshare_de.lex | 28 + Targets/nfsshare_el.lex | 28 + Targets/nfsshare_en.lex | 46 +- Targets/nfsshare_es.lex | 28 + Targets/nfsshare_et.lex | 28 + Targets/nfsshare_fr.lex | 28 + Targets/nfsshare_he.lex | 28 + Targets/nfsshare_hu.lex | 30 + Targets/nfsshare_id.lex | 28 + Targets/nfsshare_it.lex | 28 + Targets/nfsshare_ja.lex | 28 + Targets/nfsshare_nb.lex | 28 + Targets/nfsshare_nl.lex | 28 + Targets/nfsshare_pl.lex | 28 + Targets/nfsshare_pt-br.lex | 30 + Targets/nfsshare_pt.lex | 28 + Targets/nfsshare_ro.lex | 28 + Targets/nfsshare_ru.lex | 28 + Targets/nfsshare_sl.lex | 28 + Targets/nfsshare_sv.lex | 30 + Targets/nfsshare_th.lex | 28 + Targets/nfsshare_tr.lex | 28 + Targets/nfsshare_zh-cn.lex | 28 + Targets/nfsshare_zh-tw.lex | 29 + Templates/controller.pm.tem | 11 +- Templates/custom.pm.tem | 2 +- Templates/html_controls.html.ep.xml | 16 +- Templates/partial.html.ep.tem | 4 +- languages.json | 27 + sm2gen.py | 861 +++++++++--------- 38 files changed, 1258 insertions(+), 477 deletions(-) rename Targets/{Nfsshare.html.ep => nfsshare.html.ep} (91%) create mode 100644 Targets/nfsshare_bg.lex create mode 100644 Targets/nfsshare_da.lex create mode 100644 Targets/nfsshare_de.lex create mode 100644 Targets/nfsshare_el.lex create mode 100644 Targets/nfsshare_es.lex create mode 100644 Targets/nfsshare_et.lex create mode 100644 Targets/nfsshare_fr.lex create mode 100644 Targets/nfsshare_he.lex create mode 100644 Targets/nfsshare_hu.lex create mode 100644 Targets/nfsshare_id.lex create mode 100644 Targets/nfsshare_it.lex create mode 100644 Targets/nfsshare_ja.lex create mode 100644 Targets/nfsshare_nb.lex create mode 100644 Targets/nfsshare_nl.lex create mode 100644 Targets/nfsshare_pl.lex create mode 100644 Targets/nfsshare_pt-br.lex create mode 100644 Targets/nfsshare_pt.lex create mode 100644 Targets/nfsshare_ro.lex create mode 100644 Targets/nfsshare_ru.lex create mode 100644 Targets/nfsshare_sl.lex create mode 100644 Targets/nfsshare_sv.lex create mode 100644 Targets/nfsshare_th.lex create mode 100644 Targets/nfsshare_tr.lex create mode 100644 Targets/nfsshare_zh-cn.lex create mode 100644 Targets/nfsshare_zh-tw.lex create mode 100644 languages.json diff --git a/Targets/Nfsshare-Custom.pm b/Targets/Nfsshare-Custom.pm index c250937..87624c1 100644 --- a/Targets/Nfsshare-Custom.pm +++ b/Targets/Nfsshare-Custom.pm @@ -1,5 +1,5 @@ # -# Routines to be editted by the developer to provide validation for parameters +# Routines to be edited by the developer to provide validation for parameters # and provison of the control data for table(s) # # Generated by SME2Gen version:0.7 Chameleon version:4.5.4 On Python:3.10.12 at 2024-05-06 08:40 diff --git a/Targets/Nfsshare-Custom.pm.new b/Targets/Nfsshare-Custom.pm.new index 1293875..7b4d502 100644 --- a/Targets/Nfsshare-Custom.pm.new +++ b/Targets/Nfsshare-Custom.pm.new @@ -1,8 +1,8 @@ # -# Routines to be editted by the developer to provide validation for parameters +# Routines to be edited by the developer to provide validation for parameters # and provison of the control data for table(s) # -# Generated by SME2Gen version:0.7 Chameleon version:4.5.4 On Python:3.10.12 at 2024-05-06 10:02 +# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.10.12 at 2024-06-13 15:12 # use esmith::util; diff --git a/Targets/Nfsshare.pm b/Targets/Nfsshare.pm index 3a34df7..b67cda3 100644 --- a/Targets/Nfsshare.pm +++ b/Targets/Nfsshare.pm @@ -1,16 +1,15 @@ package SrvMngr::Controller::Nfsshare; # -# Generated by version:SME2Gen version:0.7 Chameleon version:4.5.4 On Python:3.10.12 at 2024-05-06 10:02 +# Generated by version:SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.10.12 at 2024-06-13 15:12 # #---------------------------------------------------------------------- # heading : Network # description : NFS data share # navigation : 2000 400 # -# name : nfsshare, method : get, url : /nfsshare, ctlact : nfsshare#main -# name : nfsshareu, method : post, url : /nfsshareu, ctlact : nfsshare#do_update -# name : nfsshared, method : get, url : /nfsshared, ctlact : nfsshare#do_display -# name : nfssharee, method : post, url : /nfsshared, ctlact : nfsshare#do_display +# name : nfsshare, method : get, url : /nfsshare, ctlact : Nfsshare#main +# name : nfsshareu, method : post, url : /nfsshareu, ctlact : Nfsshare#do_update +# name : nfsshared, method : get, url : /nfsshared, ctlact : Nfsshare#do_display # # routes : end # @@ -87,7 +86,7 @@ sub main { modul => $modul, nfs_data => \%nfs_data ); - $c->render( template => "Nfsshare" ); + $c->render( template => "nfsshare" ); } # Post request with params - submit from the form @@ -168,7 +167,7 @@ sub do_update { $c->stash(error => $c->l($ret)); $c->render("Nfsshare"); } else { - $c->stash( success => $c->l('nfs_PARAMS_panel_action_was_successfull')); #A bit bland - edit it in the lex file + $c->stash( success => $c->l('nfs_PARAMS_panel_action_was_successful')); #A bit bland - edit it in the lex file } } @@ -180,7 +179,7 @@ sub do_update { $c->stash(error => $c->l($ret)); $c->render("Nfsshare"); } else { - $c->stash( success => $c->l('nfs_TABLE_panel_action_was_successfull')); #A bit bland - edit it in the lex file + $c->stash( success => $c->l('nfs_TABLE_panel_action_was_successful')); #A bit bland - edit it in the lex file } } diff --git a/Targets/_nfs_PARAMS.html.ep b/Targets/_nfs_PARAMS.html.ep index 0e8757c..664a10c 100644 --- a/Targets/_nfs_PARAMS.html.ep +++ b/Targets/_nfs_PARAMS.html.ep @@ -1,7 +1,7 @@ %# -%# Generated by SME2Gen version:0.7 Chameleon version:4.5.4 On Python:3.10.12 at 2024-05-06 10:02 +%# Generated by SM2Gen version:0.8 Chameleon version:4.5.4 On Python:3.10.12 at 2024-06-13 15:12 %# -
+