mirror of
https://github.com/dkmstr/openuds-gui.git
synced 2025-01-21 22:03:33 +03:00
Bootstraping
This commit is contained in:
parent
bb1589bf18
commit
6165ca5444
@ -9,6 +9,7 @@
|
||||
"outDir": "dist",
|
||||
"assets": [
|
||||
"assets",
|
||||
"i18n",
|
||||
"favicon.ico"
|
||||
],
|
||||
"index": "index.html",
|
||||
|
@ -4,8 +4,8 @@
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build --prod",
|
||||
"start": "ng serve --host 172.27.0.1 --port 9000",
|
||||
"build": "ng build --prod --output-hashing=none --aot --deleteOutputPath --build-optimizer --deploy-url static",
|
||||
"test": "ng test",
|
||||
"lint": "ng lint",
|
||||
"e2e": "ng e2e"
|
||||
@ -21,7 +21,10 @@
|
||||
"@angular/platform-browser": "^5.2.0",
|
||||
"@angular/platform-browser-dynamic": "^5.2.0",
|
||||
"@angular/router": "^5.2.0",
|
||||
"@ng-bootstrap/ng-bootstrap": "^2.0.0",
|
||||
"bootstrap": "^4.1.1",
|
||||
"core-js": "^2.4.1",
|
||||
"font-awesome": "^4.7.0",
|
||||
"rxjs": "^5.5.6",
|
||||
"zone.js": "^0.8.19"
|
||||
},
|
||||
|
@ -1,21 +1,17 @@
|
||||
<!--The content below is only a placeholder and can be replaced.-->
|
||||
<div style="text-align:center">
|
||||
<h1>
|
||||
Welcome to {{ title }}!
|
||||
</h1>
|
||||
<img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==">
|
||||
<uds-navbar></uds-navbar>
|
||||
<div class="container">
|
||||
<ngb-accordion #acc="ngbAccordion" activeIds="ngb-panel-0,ngb-panel-1">
|
||||
<ngb-panel title="Title1">
|
||||
<ng-template ngbPanelContent>
|
||||
Content1
|
||||
</ng-template>
|
||||
</ngb-panel>
|
||||
<ngb-panel title="Title2">
|
||||
<ng-template ngbPanelContent udsTranslate>
|
||||
<uds-translate>Close</uds-translate>
|
||||
</ng-template>
|
||||
</ngb-panel>
|
||||
</ngb-accordion>
|
||||
</div>
|
||||
<h2>Here are some links to help you start: </h2>
|
||||
<ul>
|
||||
<li>
|
||||
<h2><a target="_blank" rel="noopener" href="https://angular.io/tutorial">Tour of Heroes</a></h2>
|
||||
</li>
|
||||
<li>
|
||||
<h2><a target="_blank" rel="noopener" href="https://github.com/angular/angular-cli/wiki">CLI Documentation</a></h2>
|
||||
</li>
|
||||
<li>
|
||||
<h2><a target="_blank" rel="noopener" href="https://blog.angular.io/">Angular blog</a></h2>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<router-outlet></router-outlet>
|
||||
|
@ -1,18 +1,26 @@
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { NavbarComponent } from './navbar/navbar.component';
|
||||
import { TranslateDirective } from './translate.directive';
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent
|
||||
AppComponent,
|
||||
NavbarComponent,
|
||||
TranslateDirective
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
AppRoutingModule
|
||||
HttpClientModule,
|
||||
AppRoutingModule,
|
||||
NgbModule.forRoot()
|
||||
],
|
||||
providers: [],
|
||||
bootstrap: [AppComponent]
|
||||
|
25
src/app/navbar/navbar.component.html
Normal file
25
src/app/navbar/navbar.component.html
Normal file
@ -0,0 +1,25 @@
|
||||
<nav class="navbar navbar-expand-md navbar-light bg-light fixed-top">
|
||||
<a class="navbar-brand" href="#">
|
||||
<img alt="Universal Desktop Services" src="/assets/udsicon.png" class="navbar-img pull-left">
|
||||
Universal Desktop Services
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#">UDS Plugin</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#">About</a>
|
||||
</li>
|
||||
<li class="nav-item dropdown" ngbDropdown>
|
||||
<a class="nav-link dropdown-toggle" id="dropdown01" ngbDropdownToggle>{{ lang }}</a>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdown01" ngbDropdownMenu>
|
||||
<a class="dropdown-item" href="#" *ngFor="let l of langs">{{ l.name }}</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
15
src/app/navbar/navbar.component.ts
Normal file
15
src/app/navbar/navbar.component.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'uds-navbar',
|
||||
templateUrl: './navbar.component.html',
|
||||
styleUrls: ['./navbar.component.css']
|
||||
})
|
||||
export class NavbarComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
15
src/app/translate.directive.ts
Normal file
15
src/app/translate.directive.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { Directive, OnInit, ElementRef } from '@angular/core';
|
||||
|
||||
@Directive({
|
||||
// tslint:disable-next-line:directive-selector
|
||||
selector: 'uds-translate'
|
||||
})
|
||||
export class TranslateDirective implements OnInit {
|
||||
|
||||
constructor(private el: ElementRef) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.el.nativeElement.outerHTML = django.gettext(this.el.nativeElement.innerHTML);
|
||||
}
|
||||
|
||||
}
|
390
src/i18n/es.js
Normal file
390
src/i18n/es.js
Normal file
@ -0,0 +1,390 @@
|
||||
|
||||
|
||||
(function(globals) {
|
||||
|
||||
var django = globals.django || (globals.django = {});
|
||||
|
||||
|
||||
django.pluralidx = function(n) {
|
||||
var v=(n != 1);
|
||||
if (typeof(v) == 'boolean') {
|
||||
return v ? 1 : 0;
|
||||
} else {
|
||||
return v;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/* gettext library */
|
||||
|
||||
django.catalog = django.catalog || {};
|
||||
|
||||
var newcatalog = {
|
||||
"(filtered from _MAX_ total records)": "(registros filtrados de un total de _MAX_)",
|
||||
"(no days)": "(sin d\u00edas)",
|
||||
"Accept": "Aceptar",
|
||||
"Access calendar removal error": "Error en el borrado del calendario de acceso",
|
||||
"Active": "Activo",
|
||||
"Add": "A\u00f1adir",
|
||||
"Add access calendar": "A\u00f1adir calendario de acceso",
|
||||
"Add group": "Agregar grupo",
|
||||
"Add scheduled action": "A\u00f1adir acci\u00f3n programada",
|
||||
"Add transport": "A\u00f1adir transporte",
|
||||
"April": "Abril",
|
||||
"Are you sure do you want to delete ": "\u00bfEst\u00e1s seguro de que lo quieres eliminar?",
|
||||
"August": "Agosto",
|
||||
"Authenticator creation error": "Error al crear autenticador",
|
||||
"Authenticator deletion error": "Error al eliminar autenticador",
|
||||
"Authenticator saving error": "Error al guardar autenticador",
|
||||
"Beginning": "Inicio",
|
||||
"Cache": "Cach\u00e9",
|
||||
"Cache has been flushed": "La cach\u00e9 se ha vaciado",
|
||||
"Calendar creation error": "Error de creaci\u00f3n de calendario",
|
||||
"Calendar deletion error": "Error de eliminaci\u00f3n de calendario",
|
||||
"Calendar saving error": "Error guardando calendario",
|
||||
"Cancel": "Cancelar",
|
||||
"Cancel publication?": "\u00bfCancelar la publicaci\u00f3n?",
|
||||
"Click on a row to select it": "Haga clic en una fila para seleccionarla",
|
||||
"Close": "Cerrar",
|
||||
"Configuration saved": "Configuraci\u00f3n guardada",
|
||||
"Confirm revocation of following permissions: <br/>": "Confirmar la revocaci\u00f3n de los permisos siguientes: <br/>",
|
||||
"Connection failed": "Conexi\u00f3n fallida",
|
||||
"Contacting service...": "Contactando con servicio...",
|
||||
"Creation successfully done": "Creaci\u00f3n realizada con \u00e9xito",
|
||||
"Daily": "Diario",
|
||||
"Date": "Fecha",
|
||||
"Days": "D\u00edas",
|
||||
"December": "Diciembre",
|
||||
"Default fallback access": "Acceso predeterminado",
|
||||
"Delete": "Borrar",
|
||||
"Delete Image": "Borrar imagen",
|
||||
"Delete OSManager": "Eliminar OS Manager",
|
||||
"Delete Services Pool Group": "Borrar grupo para Services Pool",
|
||||
"Delete authenticator": "Eliminar autenticador",
|
||||
"Delete calendar": "Eliminar calendario",
|
||||
"Delete group": "Borrar grupo",
|
||||
"Delete network": "Eliminar red",
|
||||
"Delete rule": "Eliminar regla",
|
||||
"Delete service": "Eliminar servicio",
|
||||
"Delete services provider": "Eliminar proveedor de servicios",
|
||||
"Delete transport": "Eliminar transporte",
|
||||
"Delete user": "Eliminar usuario",
|
||||
"Delete user service": "Eliminar servicio de usuario",
|
||||
"Deletion error": "Error de eliminaci\u00f3n",
|
||||
"Deletion results": "Resultados de la eliminaci\u00f3n",
|
||||
"Edit": "Editar",
|
||||
"Edit OSManager": "Editar OS Manager",
|
||||
"Edit Services Pool Group": "Editar grupo para Services Pool",
|
||||
"Edit access calendar": "Editar calendario de acceso",
|
||||
"Edit authenticator": "Editar autenticador",
|
||||
"Edit calendar": "Editar calendario",
|
||||
"Edit group": "Editar grupo",
|
||||
"Edit image": "Editar imagen",
|
||||
"Edit network": "Editar red",
|
||||
"Edit rule": "Editar regla",
|
||||
"Edit service": "Editar servicio",
|
||||
"Edit services provider": "Editar proveedor de servicios",
|
||||
"Edit transport": "Editar transporte",
|
||||
"Edit user": "Editar usuario",
|
||||
"Edition successfully done": "Edici\u00f3n realizada con \u00e9xito",
|
||||
"Empty": "Vac\u00edo",
|
||||
"Ending": "Final",
|
||||
"Enter Maintenance Mode?": "\u00bfEntrar en modo mantenimiento?",
|
||||
"Enter maintenance Mode": "Entrar en modo mantenimiento",
|
||||
"Error accessing data": "Error de acceso a datos",
|
||||
"Error accessing service: ": "Error al acceder al servicio: ",
|
||||
"Error creating report": "Error al crear el informe",
|
||||
"Error creating rule": "Error creando regla",
|
||||
"Error deleting": "Error borrando",
|
||||
"Error obtaining report description": "Error al obtener la descripci\u00f3n del informe",
|
||||
"Error saving rule": "Error al guardar la regla",
|
||||
"Execute action": "Ejecutar acci\u00f3n",
|
||||
"Exit Maintenance Mode": "Salir del modo mantenimiento",
|
||||
"Exit Maintenance Mode?": "Salir del modo mantenimiento",
|
||||
"Failed creating publication": "No se pudo crear la publicaci\u00f3n",
|
||||
"February": "Febrero",
|
||||
"Filter": "Filtro",
|
||||
"Force Cancel": "Forzar cancelaci\u00f3n",
|
||||
"Friday": "Viernes",
|
||||
"Generate report": "Generar informe",
|
||||
"Group": "Grupo",
|
||||
"Group deletion error": "Error al borrar grupo",
|
||||
"Group information": "Informaci\u00f3n del grupo",
|
||||
"Group saved": "Grupo guardado",
|
||||
"Group saving error": "Error al guardar grupo",
|
||||
"Groups found": "Grupos encontrados",
|
||||
"Hours": "Horas",
|
||||
"If selected, will initiate the publication inmediatly after creation": "Si se selecciona, se iniciar\u00e1 la publicaci\u00f3n inmediatamente despu\u00e9s de la creaci\u00f3n",
|
||||
"Image deletion error": "Error al borrar la imagen",
|
||||
"Image is too big (max. upload size is 256Kb)": "La imagen es demasiado grande (el tama\u00f1o m\u00e1ximo es de 256Kb)",
|
||||
"In Maintenance": "En mantenimiento",
|
||||
"Information": "Informaci\u00f3n",
|
||||
"January": "Enero",
|
||||
"July": "Julio",
|
||||
"June": "Junio",
|
||||
"Just a moment...": "Un momento...",
|
||||
"Launch Now": "Lanzar ahora",
|
||||
"Launch action execution right now?": "\u00bfIniciar la ejecuci\u00f3n de la acci\u00f3n ahora?",
|
||||
"Logs": "Logs",
|
||||
"Main": "Principal",
|
||||
"Maintenance": "Mantenimiento",
|
||||
"Maintenance Mode": "Modo de mantenimiento",
|
||||
"March": "Marzo",
|
||||
"May": "Mayo",
|
||||
"Message": "Mensaje",
|
||||
"Minutes": "Minutos",
|
||||
"Monday": "Lunes",
|
||||
"Monthly": "Mensual",
|
||||
"Network creation error": "Error al crear red",
|
||||
"Network deletion error": "Error al eliminar red",
|
||||
"Network saving error": "Error al guardar red",
|
||||
"Never": "Nunca",
|
||||
"New": "Nuevo",
|
||||
"New OSManager": "Nuevo OS Manager",
|
||||
"New Services Pool Group": "Nuevo grupo para Services Pool",
|
||||
"New authenticator": "Nuevo autenticador",
|
||||
"New calendar": "Nuevo calendario",
|
||||
"New group": "Nuevo grupo",
|
||||
"New image": "Nueva imagen",
|
||||
"New meta group": "Nuevo meta grupo",
|
||||
"New network": "Nueva red",
|
||||
"New rule": "Nueva regla",
|
||||
"New service": "Nuevo servicio",
|
||||
"New service pool": "Nuevo Pool de Servicios",
|
||||
"New services provider": "Nuevo proveedor de servicios",
|
||||
"New transport": "Nuevo transporte",
|
||||
"New user": "Nuevo usuario",
|
||||
"No": "No",
|
||||
"No changes has been made": "No se han hecho cambios",
|
||||
"No records": "No hay registros",
|
||||
"November": "Noviembre",
|
||||
"OSManager creation error": "Error al crear OS Manager",
|
||||
"OSManager deletion error": "Error al eliminarl OS Manager",
|
||||
"OSManager saving error": "Error al guardar OS Manager",
|
||||
"October": "Octubre",
|
||||
"Overview": "Visi\u00f3n de conjunto",
|
||||
"Permissions": "Permisos",
|
||||
"Permissions for": "Permisos para",
|
||||
"Please enter a valid URL.": "Por favor, introduzca una URL v\u00e1lida.",
|
||||
"Please enter a valid credit card number.": "Por favor, introduzca un n\u00famero de tarjeta de cr\u00e9dito v\u00e1lida.",
|
||||
"Please enter a valid date (ISO).": "Por favor, introduzca una fecha v\u00e1lida (ISO).",
|
||||
"Please enter a valid date.": "Por favor, introduzca una fecha v\u00e1lida.",
|
||||
"Please enter a valid email address.": "Por favor, introduzca una direcci\u00f3n de correo electr\u00f3nico v\u00e1lida.",
|
||||
"Please enter a valid number.": "Por favor, introduzca un n\u00famero v\u00e1lido.",
|
||||
"Please enter a value between {0} and {1} characters long.": "Por favor, introduzca un valor de entre {0} y {1} caracteres.",
|
||||
"Please enter a value between {0} and {1}.": "Por favor, introduzca un valor entre {0} y {1}.",
|
||||
"Please enter a value greater than or equal to {0}.": "Por favor, introduzca un valor mayor o igual a {0}.",
|
||||
"Please enter a value less than or equal to {0}.": "Por favor, introduzca un valor menor o igual a {0}.",
|
||||
"Please enter at least {0} characters.": "Por favor, introduzca al menos {0} caracteres.",
|
||||
"Please enter no more than {0} characters.": "Por favor, no introduzca m\u00e1s de {0} caracteres.",
|
||||
"Please enter only digits.": "Por favor, introduzca s\u00f3lo cifras.",
|
||||
"Please enter the same value again.": "Por favor, introduzca el mismo valor otra vez.",
|
||||
"Please fix this field.": "Por favor corrija este campo.",
|
||||
"Please wait, processing": "Por favor espere, procesando",
|
||||
"Publish": "Publicar",
|
||||
"Publish on creation": "Publicar en la creaci\u00f3n",
|
||||
"Records _START_ to _END_ of _TOTAL_": "Registros de _START_ a _END_ de _TOTAL_",
|
||||
"Refresh operation failed": "Error en la operaci\u00f3n de actualizaci\u00f3n",
|
||||
"Remove ": "Quitar ",
|
||||
"Remove Assigned service": "Quitar servicio asignado",
|
||||
"Remove Cache element": "Retirar elemento de la cach\u00e9",
|
||||
"Remove access calendar": "Eliminar calendario de acceso",
|
||||
"Remove transport": "Quitar transporte",
|
||||
"Restrained": "Contenido",
|
||||
"Revoke": "Revocar",
|
||||
"Rule deletion error": "Error al eliminar la regla",
|
||||
"Saturday": "S\u00e1bado",
|
||||
"Save": "Guardar",
|
||||
"Search error": "Error en la b\u00fasqueda",
|
||||
"Search groups": "Buscar grupos",
|
||||
"Search users": "Buscar usuarios",
|
||||
"Selected %d rows": "%d filas seleccionadas",
|
||||
"Selected one row": "Seleccionar una fila",
|
||||
"September": "Septiembre",
|
||||
"Service creation error": "Error al crear servicio",
|
||||
"Service deletion error": "Error al eliminar servicio",
|
||||
"Service information": "Informaci\u00f3n sobre el servicio",
|
||||
"Service saving error": "Error al guardar servicio",
|
||||
"Services Pool Group creation error": "Error de creaci\u00f3n de grupo de servicios piscina",
|
||||
"Services Pool Group removal error": "Error de eliminaci\u00f3n de grupo para Services Pool",
|
||||
"Services Pool Group saving error": "Error al guardar grupo para Services Pool",
|
||||
"Services Provider deletion error": "Error al eliminar el proveedor de servicios",
|
||||
"Services Provider saving error": "Error al guardar proveedor de servicios",
|
||||
"Services provider creation error": "Error en la creaci\u00f3n del proveedor de servicios",
|
||||
"Staff member": "Miembro del personal",
|
||||
"Successfully deleted": "Eliminado correctamente",
|
||||
"Sun": "Dom",
|
||||
"Sunday": "Domingo",
|
||||
"Test": "Prueba",
|
||||
"Test failed:": "El test ha fallado:",
|
||||
"Test passed successfully": "Test superado con \u00e9xito",
|
||||
"This field is required.": "Este campo es obligatorio",
|
||||
"This rule will be valid every ": "Esta regla ser\u00e1 v\u00e1lida cada ",
|
||||
"Thursday": "Jueves",
|
||||
"Transport creation error": "Error al crear transporte",
|
||||
"Transport deletion error": "Error al eliminar transporte",
|
||||
"Transport removal error": "Error al quitar transporte",
|
||||
"Transport saving error": "Error al guardar transporte",
|
||||
"Tuesday": "Martes",
|
||||
"Upload": "Subir",
|
||||
"User": "Usuario",
|
||||
"User deletion error": "Error al borrar usuario",
|
||||
"User information": "Informaci\u00f3n de usuario",
|
||||
"User saved": "Usuario guardado",
|
||||
"User saving error": "Error al guardar usuario",
|
||||
"User service deletion error": "Error en la eliminaci\u00f3n del servicio de usuario",
|
||||
"Users found": "Usuarios encontrados",
|
||||
"Wednesday": "Mi\u00e9rcoles",
|
||||
"Weekdays": "D\u00edas de la semana",
|
||||
"Weekly": "Semanal",
|
||||
"Weeks": "Semanas",
|
||||
"Xls": "Xls",
|
||||
"Yearly": "Anual",
|
||||
"Yes": "S\u00ed",
|
||||
"You must provide a transport": "Debe proporcionar un transporte",
|
||||
"You must provide authenticator and": "Usted debe proporcionar autenticador y",
|
||||
"You must provide authenticator and group": "Debe proporcionar autenticador y grupo",
|
||||
"You must select an image": "Debe seleccionar una imagen",
|
||||
"_MENU_ records per page": "_MENU_ Registros por p\u00e1gina",
|
||||
"and will remain valid for": "y seguir\u00e1 siendo v\u00e1lida durante",
|
||||
"creation error": "error de creaci\u00f3n",
|
||||
"day": "d\u00eda",
|
||||
"days": "d\u00edas",
|
||||
"deletion error": "error al eliminar",
|
||||
"error": "error",
|
||||
"from": "Desde el",
|
||||
"items:": "elementos:",
|
||||
"level": "nivel",
|
||||
"message": "Mensaje",
|
||||
"month": "mes",
|
||||
"months": "meses",
|
||||
"no": "no",
|
||||
"of any week": "de cualquier semana",
|
||||
"of type": "de tipo",
|
||||
"onwards": "en adelante",
|
||||
"saving error": "error al guardar",
|
||||
"source": "fuente",
|
||||
"starting at": "comenzando a las",
|
||||
"until ": "hasta ",
|
||||
"week": "semana",
|
||||
"weeks": "semanas",
|
||||
"with no duration": "sin duraci\u00f3n",
|
||||
"year": "a\u00f1o",
|
||||
"years": "a\u00f1os",
|
||||
"yes": "s\u00ed"
|
||||
};
|
||||
for (var key in newcatalog) {
|
||||
django.catalog[key] = newcatalog[key];
|
||||
}
|
||||
|
||||
|
||||
if (!django.jsi18n_initialized) {
|
||||
django.gettext = function(msgid) {
|
||||
var value = django.catalog[msgid];
|
||||
if (typeof(value) == 'undefined') {
|
||||
return msgid;
|
||||
} else {
|
||||
return (typeof(value) == 'string') ? value : value[0];
|
||||
}
|
||||
};
|
||||
|
||||
django.ngettext = function(singular, plural, count) {
|
||||
var value = django.catalog[singular];
|
||||
if (typeof(value) == 'undefined') {
|
||||
return (count == 1) ? singular : plural;
|
||||
} else {
|
||||
return value[django.pluralidx(count)];
|
||||
}
|
||||
};
|
||||
|
||||
django.gettext_noop = function(msgid) { return msgid; };
|
||||
|
||||
django.pgettext = function(context, msgid) {
|
||||
var value = django.gettext(context + '\x04' + msgid);
|
||||
if (value.indexOf('\x04') != -1) {
|
||||
value = msgid;
|
||||
}
|
||||
return value;
|
||||
};
|
||||
|
||||
django.npgettext = function(context, singular, plural, count) {
|
||||
var value = django.ngettext(context + '\x04' + singular, context + '\x04' + plural, count);
|
||||
if (value.indexOf('\x04') != -1) {
|
||||
value = django.ngettext(singular, plural, count);
|
||||
}
|
||||
return value;
|
||||
};
|
||||
|
||||
django.interpolate = function(fmt, obj, named) {
|
||||
if (named) {
|
||||
return fmt.replace(/%\(\w+\)s/g, function(match){return String(obj[match.slice(2,-2)])});
|
||||
} else {
|
||||
return fmt.replace(/%s/g, function(match){return String(obj.shift())});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/* formatting library */
|
||||
|
||||
django.formats = {
|
||||
"DATETIME_FORMAT": "N j, Y, P",
|
||||
"DATETIME_INPUT_FORMATS": [
|
||||
"%Y-%m-%d %H:%M:%S",
|
||||
"%Y-%m-%d %H:%M:%S.%f",
|
||||
"%Y-%m-%d %H:%M",
|
||||
"%Y-%m-%d",
|
||||
"%m/%d/%Y %H:%M:%S",
|
||||
"%m/%d/%Y %H:%M:%S.%f",
|
||||
"%m/%d/%Y %H:%M",
|
||||
"%m/%d/%Y",
|
||||
"%m/%d/%y %H:%M:%S",
|
||||
"%m/%d/%y %H:%M:%S.%f",
|
||||
"%m/%d/%y %H:%M",
|
||||
"%m/%d/%y"
|
||||
],
|
||||
"DATE_FORMAT": "N j, Y",
|
||||
"DATE_INPUT_FORMATS": [
|
||||
"%Y-%m-%d",
|
||||
"%m/%d/%Y",
|
||||
"%m/%d/%y"
|
||||
],
|
||||
"DECIMAL_SEPARATOR": ".",
|
||||
"FIRST_DAY_OF_WEEK": "0",
|
||||
"MONTH_DAY_FORMAT": "F j",
|
||||
"NUMBER_GROUPING": "3",
|
||||
"SHORT_DATETIME_FORMAT": "m/d/Y P",
|
||||
"SHORT_DATE_FORMAT": "m/d/Y",
|
||||
"THOUSAND_SEPARATOR": ",",
|
||||
"TIME_FORMAT": "P",
|
||||
"TIME_INPUT_FORMATS": [
|
||||
"%H:%M:%S",
|
||||
"%H:%M:%S.%f",
|
||||
"%H:%M"
|
||||
],
|
||||
"YEAR_MONTH_FORMAT": "F Y"
|
||||
};
|
||||
|
||||
django.get_format = function(format_type) {
|
||||
var value = django.formats[format_type];
|
||||
if (typeof(value) == 'undefined') {
|
||||
return format_type;
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
};
|
||||
|
||||
/* add to global namespace */
|
||||
globals.pluralidx = django.pluralidx;
|
||||
globals.gettext = django.gettext;
|
||||
globals.ngettext = django.ngettext;
|
||||
globals.gettext_noop = django.gettext_noop;
|
||||
globals.pgettext = django.pgettext;
|
||||
globals.npgettext = django.npgettext;
|
||||
globals.interpolate = django.interpolate;
|
||||
globals.get_format = django.get_format;
|
||||
|
||||
django.jsi18n_initialized = true;
|
||||
}
|
||||
|
||||
}(this));
|
||||
|
@ -7,6 +7,22 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||
|
||||
<!-- DYNAMIC_DATA -->
|
||||
<script type="text/javascript" src="i18n/es.js"></script>
|
||||
<script type="text/javascript">
|
||||
var udsConfig = {
|
||||
language: 'es',
|
||||
available_languages: [
|
||||
{id: 'es', name: 'Spanish'},
|
||||
{id: 'en', name: 'English'},
|
||||
{id: 'fr', name: 'French'},
|
||||
{id: 'it', name: 'Italian'},
|
||||
]
|
||||
};
|
||||
</script>
|
||||
<!-- ENDDYNAMIC_DATA -->
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<uds-root></uds-root>
|
||||
|
0
src/static/.gitkeep
Normal file
0
src/static/.gitkeep
Normal file
BIN
src/static/login-img.png
Normal file
BIN
src/static/login-img.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.6 KiB |
BIN
src/static/udsicon.png
Normal file
BIN
src/static/udsicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.5 KiB |
@ -1 +1,2 @@
|
||||
/* You can add global styles to this file, and also import other style files */
|
||||
@import "~bootstrap/dist/css/bootstrap.css"
|
||||
|
3
src/typings.d.ts
vendored
3
src/typings.d.ts
vendored
@ -3,3 +3,6 @@ declare var module: NodeModule;
|
||||
interface NodeModule {
|
||||
id: string;
|
||||
}
|
||||
/* UDS injected modules */
|
||||
declare var django:any;
|
||||
declare var udsConfig:any;
|
||||
|
12
yarn.lock
12
yarn.lock
@ -159,6 +159,10 @@
|
||||
dependencies:
|
||||
tslib "^1.7.1"
|
||||
|
||||
"@ng-bootstrap/ng-bootstrap@^2.0.0":
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@ng-bootstrap/ng-bootstrap/-/ng-bootstrap-2.0.0.tgz#65f78c7dd5a8ac424f44bb2050a9eab247cdeb0c"
|
||||
|
||||
"@ngtools/json-schema@1.2.0":
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@ngtools/json-schema/-/json-schema-1.2.0.tgz#06e5ecd29e9a37d260a447dd873ea2becd228c4f"
|
||||
@ -767,6 +771,10 @@ boom@5.x.x:
|
||||
dependencies:
|
||||
hoek "4.x.x"
|
||||
|
||||
bootstrap@^4.1.1:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.1.1.tgz#3aec85000fa619085da8d2e4983dfd67cf2114cb"
|
||||
|
||||
brace-expansion@^1.1.7:
|
||||
version "1.1.11"
|
||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
|
||||
@ -2301,6 +2309,10 @@ follow-redirects@^1.0.0:
|
||||
dependencies:
|
||||
debug "^3.1.0"
|
||||
|
||||
font-awesome@^4.7.0:
|
||||
version "4.7.0"
|
||||
resolved "https://registry.yarnpkg.com/font-awesome/-/font-awesome-4.7.0.tgz#8fa8cf0411a1a31afd07b06d2902bb9fc815a133"
|
||||
|
||||
for-in@^0.1.3:
|
||||
version "0.1.8"
|
||||
resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.8.tgz#d8773908e31256109952b1fdb9b3fa867d2775e1"
|
||||
|
Loading…
x
Reference in New Issue
Block a user