Merge pull request #229 from Reena-cell/develop

perform i18n in login Oauth button
This commit is contained in:
Simon Redfern 2022-09-21 14:19:21 +02:00 committed by GitHub
commit 4751fc58bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 57 additions and 55 deletions

View File

@ -256,6 +256,7 @@ API_VERSION = '4.0.0'
API_TESTER_URL = 'https://www.example.com'
SHOW_API_TESTER = True
# Always save session$
SESSION_SAVE_EVERY_REQUEST = True

View File

@ -29,7 +29,7 @@
<div class="col-xs-12 col-sm-9">
<div class="authentication-method" id="authenticate-oauth">
<a class="btn btn-primary" href="{% url 'oauth-initiate' %}{% if request.GET.next %}?next={{ request.GET.next }}{% endif %}">Proceed to authentication server</a>
<a class="btn btn-primary" href="{% url 'oauth-initiate' %}{% if request.GET.next %}?next={{ request.GET.next }}{% endif %}">{% trans "Proceed to authentication server" %}</a>
</div>
<div class="authentication-method" id="authenticate-directlogin">
<form action="{% url 'directlogin' %}" method="post">

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-09-19 11:19+0200\n"
"POT-Creation-Date: 2022-09-20 13:08+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -47,14 +47,14 @@ msgstr "Describir el propósito de la colección"
#: connectormethod/templates/connectormethod/index.html:73
#: customers/templates/customers/create.html:185
#: dynamicendpoints/templates/dynamicendpoints/index.html:33
#: users/templates/users/invitation.html:65
#: users/templates/users/invitation.html:65 webui/templates/webui/index.html:53
msgid "Create"
msgstr "Creada"
#: apicollections/templates/apicollections/index.html:72
#: dynamicendpoints/templates/dynamicendpoints/index.html:40
#: methodrouting/templates/methodrouting/index.html:129
#: users/templates/users/detail.html:112 webui/templates/webui/index.html:51
#: users/templates/users/detail.html:112 webui/templates/webui/index.html:46
msgid "Delete"
msgstr "Eliminar"
@ -249,7 +249,7 @@ msgid "Balance Inquiry Fee"
msgstr "Cargo por consulta de saldo"
#: atmlist/templates/atmlist/atmlist.html:2
#: atmlist/templates/atmlist/atmlist.html:4 base/templates/base.html:85
#: atmlist/templates/atmlist/atmlist.html:4 base/templates/base.html:70
msgid "ATM List"
msgstr "Vista de Cajeros Automáticos"
@ -272,7 +272,7 @@ msgstr "Más información"
msgid "View"
msgstr "Ver"
#: atms/templates/atms/index.html:3 base/templates/base.html:84
#: atms/templates/atms/index.html:3 base/templates/base.html:69
msgid "ATM Create"
msgstr "Creada"
@ -295,28 +295,24 @@ msgstr "Seleccione..."
msgid "API Manager"
msgstr "Administrador de API"
#: base/templates/base.html:29
msgid "Logout"
msgstr "Cerrar la sesión"
#: base/templates/base.html:48
#: base/templates/base.html:35
msgid "Home"
msgstr "Inicio"
#: base/templates/base.html:50 consumers/templates/consumers/index.html:10
#: base/templates/base.html:37 consumers/templates/consumers/index.html:10
msgid "Consumers"
msgstr "Consumidores"
#: base/templates/base.html:52
#: base/templates/base.html:39
#: entitlementrequests/templates/entitlementrequests/index.html:8
msgid "Entitlement Requests"
msgstr "Solicitudes de derechos"
#: base/templates/base.html:57 users/templates/users/index.html:8
#: base/templates/base.html:42 users/templates/users/index.html:8
msgid "Users"
msgstr "Usuarios"
#: base/templates/base.html:59
#: base/templates/base.html:44
#: consumers/templates/consumers/includes/filter_apptype.html:4
#: consumers/templates/consumers/includes/filter_enabled.html:4
#: consumers/templates/consumers/includes/filter_time.html:7
@ -325,77 +321,81 @@ msgstr "Usuarios"
msgid "All"
msgstr "Todos"
#: base/templates/base.html:60
#: base/templates/base.html:46
msgid "My User"
msgstr "Mi usuaria"
#: base/templates/base.html:61 users/templates/users/invitation.html:8
#: base/templates/base.html:48 users/templates/users/invitation.html:8
msgid "Invite Developer"
msgstr "Invitar a desarrollador"
#: base/templates/base.html:68
#: base/templates/base.html:53
msgid "Metrics"
msgstr "Métrica"
#: base/templates/base.html:70 metrics/templates/metrics/api.html:9
#: base/templates/base.html:55 metrics/templates/metrics/api.html:9
msgid "API Metrics"
msgstr "Métricas de la API"
#: base/templates/base.html:71 metrics/templates/metrics/connector.html:9
#: base/templates/base.html:57 metrics/templates/metrics/connector.html:9
msgid "Connector Metrics"
msgstr "Métricas del conector"
#: base/templates/base.html:72
#: base/templates/base.html:59
msgid "KPI Dashboard"
msgstr "Panel de KPI"
#: base/templates/base.html:80
#: base/templates/base.html:64
msgid "Resources"
msgstr "Recursos"
#: base/templates/base.html:82 customers/templates/customers/create.html:5
#: base/templates/base.html:66 customers/templates/customers/create.html:5
msgid "Customers"
msgstr "Consumidores"
#: base/templates/base.html:83 branches/templates/branches/index.html:9
#: base/templates/base.html:68 branches/templates/branches/index.html:9
msgid "Branches"
msgstr "Sucursales"
#: base/templates/base.html:95
#: base/templates/base.html:75
msgid "Configurations"
msgstr "Configuraciones"
#: base/templates/base.html:97 config/templates/config/index.html:8
#: base/templates/base.html:77 config/templates/config/index.html:8
msgid "Config"
msgstr "Configuraciones"
#: base/templates/base.html:98
#: base/templates/base.html:79
msgid "Webui Props"
msgstr "Accesorios webui"
#: base/templates/base.html:99
#: base/templates/base.html:81
msgid "Method Routings"
msgstr "Enrutamiento de métodos"
#: base/templates/base.html:100
#: base/templates/base.html:83
#: connectormethod/templates/connectormethod/detail.html:6
#: connectormethod/templates/connectormethod/index.html:6
msgid "Connector Methods"
msgstr "Métricas del conector"
#: base/templates/base.html:101
#: base/templates/base.html:85
#: dynamicendpoints/templates/dynamicendpoints/index.html:7
msgid "Dynamic Endpoints"
msgstr "Puntos finales dinámicos"
#: base/templates/base.html:102
#: base/templates/base.html:88
msgid "My API Collections"
msgstr "Mis colecciones de API"
#: base/templates/base.html:107
#: base/templates/base.html:93
msgid "API Tester"
msgstr "Métricas de la API"
#: base/templates/base.html:99
msgid "Logout"
msgstr "Cerrar la sesión"
#: base/templates/home.html:5
msgid "Welcome to API Manager"
msgstr "Bienvenido al Administrador de API"
@ -438,6 +438,10 @@ msgstr "Autentificar"
msgid "Choose ..."
msgstr "Seleccione..."
#: base/templates/home.html:32
msgid "Proceed to authentication server"
msgstr "Weiter zum Authentifizierungsserver"
#: branches/forms.py:13 branches/templates/branches/index.html:160
msgid "Branch Id"
msgstr "Identificación de la sucursal"
@ -770,6 +774,7 @@ msgstr "Identificación"
#: entitlementrequests/templates/entitlementrequests/index.html:31
#: entitlementrequests/templates/entitlementrequests/index.html:32
#: users/templates/users/detail.html:98 users/templates/users/index.html:60
#: webui/templates/webui/index.html:15
msgid "Action"
msgstr "Acción"
@ -1643,21 +1648,21 @@ msgstr "Accesorios webui"
msgid "Web UI Props Value"
msgstr "Accesorios webui"
#: webui/templates/webui/index.html:15
msgid "Web UI Props Id"
#: webui/templates/webui/index.html:18
#, fuzzy
#| msgid "Web UI Props Id"
msgid "Props Id"
msgstr "Accesorios webui"
#: webui/templates/webui/index.html:18
msgid "Save Value"
msgstr "Guardar valor"
#: webui/templates/webui/index.html:48
#: webui/templates/webui/index.html:43
msgid "Save"
msgstr "Ahorrar"
#: webui/templates/webui/index.html:54
msgid "Create Locale"
msgstr "Creada"
#~ msgid "Save Value"
#~ msgstr "Guardar valor"
#~ msgid "Create Locale"
#~ msgstr "Creada"
#~ msgid "ATMs Detail"
#~ msgstr "Descripción"

View File

@ -20,22 +20,21 @@
</div>
<form method="post">
{% csrf_token %} {% for webui_prop in webui_props %}
{% csrf_token %}
{% for webui_prop in webui_props %}
<div class="runner">
<div class="row">
<input type="hidden" class="web_ui_props_id" value="{{ webui_prop.web_ui_props_id }}" />
<div class="col-xs-12 col-sm-4">
<div class="form-group" cols="20" rows="1">
<div class="web_ui_props_name" style="float: left">
{{ webui_prop.name }}
<div class="web_ui_props_name">{{ webui_prop.name }}
</div>
<span class="language_list"></span>
<!--<span class="language_list"></span>-->
</div>
</div>
<div class="col-xs-12 col-sm-3">
<div class="form-group">
<textarea class="form-control required web_ui_props_value" cols="40" rows="1">
{{ webui_prop.value }}</textarea>
<textarea class="form-control required web_ui_props_value" cols="40" rows="1">{{ webui_prop.value }}</textarea>
</div>
</div>
<div class="col-sm-12 col-sm-4">
@ -79,8 +78,7 @@
var web_ui_props_value = $(runner).find(".web_ui_props_value").val();
$(".runner button.forSave").attr("disabled", "disabled");
$(".runner button.forDelete").attr("disabled", "disabled");
$.post(
"save/method", {
$.post("save/method", {
web_ui_props_name: web_ui_props_name,
web_ui_props_value: web_ui_props_value,
},
@ -101,8 +99,7 @@
var webui = $("#webui");
$(".runner button.forSave").attr("disabled", "disabled");
$(".runner button.forDelete").attr("disabled", "disabled");
$.post(
"delete/method", {
$.post("delete/method", {
web_ui_props_id: web_ui_props_id,
},
function(response) {
@ -118,9 +115,7 @@
var languages = $(runner).find(".language").val();
if (languages == "es_ES") {
$(runner)
.find(".language_list")
.text("_" + languages);
$(runner).find(".language_list").text("_" + languages);
} else {
$(runner).find(".language_list").text("");
}

View File

@ -53,6 +53,7 @@ def webui_save(request):
urlpath = '/management/webui_props'
web_ui_props_name = request.POST.get('web_ui_props_name')
web_ui_props_value = request.POST.get('web_ui_props_value')
#print("web_ui_props_name", request.get)
payload = {
'name': web_ui_props_name,
'value': web_ui_props_value