From 0aea01f85510f6a209efae3de94038de61b54def Mon Sep 17 00:00:00 2001 From: Dave Arter Date: Tue, 7 Mar 2017 14:07:38 +0000 Subject: Use localised strings.js based on CONFIG.LANGUAGE --- www/index.html | 5 ++++- www/js/strings.en.js | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++ www/js/strings.es.js | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++ www/js/strings.js | 58 ---------------------------------------------------- 4 files changed, 120 insertions(+), 59 deletions(-) create mode 100644 www/js/strings.en.js create mode 100644 www/js/strings.es.js delete mode 100644 www/js/strings.js diff --git a/www/index.html b/www/index.html index 322f95a..21837d2 100644 --- a/www/index.html +++ b/www/index.html @@ -72,7 +72,10 @@ - + + diff --git a/www/js/strings.en.js b/www/js/strings.en.js new file mode 100644 index 0000000..1dabd30 --- /dev/null +++ b/www/js/strings.en.js @@ -0,0 +1,58 @@ +(function (FMS, _) { + _.extend( FMS, { + validationStrings: { + update: 'Please enter a message', + title: 'Please enter a subject', + detail: 'Please enter some details', + name: { + required: 'Please enter your name', + validName: 'Please enter your full name, councils need this information - if you do not wish your name to be shown on the site, untick the box below' + }, + category: 'Please choose a category', + rznvy: { + required: 'Please enter your email', + email: 'Please enter a valid email' + }, + email: { + required: 'Please enter your email', + email: 'Please enter a valid email' + }, + password: 'Please enter a password' + }, + strings: { + next: 'Next', + untitled_draft: 'Untitled draft', + login_error: 'There was a problem logging you in. Please try again later.', + logout_error: 'There was a problem logging you out. Please try again later.', + login_details_error: 'There was a problem logging you in. Please check your email and password and that you have confirmed your password.', + password_problem: 'There was a problem with your email/password combination. If you have forgotten your password, or do not have one, you can set one by returning to the email screen and selecting the set password option. Passwords are not activated until the link in the confirmation email is clicked.', + search_placeholder: 'Search for a place or postcode', + location_error: 'Location error', + location_problem: 'There was a problem looking up your location.', + multiple_locations: 'More than one location matched that name. Select one below or try entering street name and area, or a postcode.', + sync_error: 'An error was encountered when submitting your report: ', + unknown_sync_error: 'There was a problem submitting your report. Please try again later.', + report_send_error: 'There was a problem submitting your report. Please try again.', + missing_location: 'Please enter a location', + location_check_failed: 'There was a problem checking we cover this location. Please try again later.', + category_extra_check_error: 'There was a problem checking if we have all the details we need. Please try again later.', + locate_dismissed: 'Please search for a street name and area, or postcode.', + geolocation_failed: "Sorry, but we weren't able to establish your location accurately enough to show you a map. Please enter a location in the search box instead", + geolocation_denied: 'Could not access location services. Please check permissions.', + select_category: '-- Pick a category --', + offline_got_position: 'Got location.', + offline_failed_position: 'Could not get location.', + required: 'required', + invalid_email: 'Invalid email', + invalid_report: 'Invalid report', + photo_failed: 'There was a problem taking your photo.', + photo_added: 'Photo added', + photo_loading: 'Uploading images may take some time, please be patient', + upload_aborted: 'There was a problem uploading your report.', + try_again: 'Try Again', + save_for_later: 'Save for Later', + no_connection: 'No network connection available for submitting your report. Please try again later.', + more_details: 'More details' + } + }); +})(FMS, _); diff --git a/www/js/strings.es.js b/www/js/strings.es.js new file mode 100644 index 0000000..9c8b950 --- /dev/null +++ b/www/js/strings.es.js @@ -0,0 +1,58 @@ +(function (FMS, _) { + _.extend( FMS, { + validationStrings: { + update: 'Por favor, introduzca un mensaje', + title: 'Por favor, introduzca un título', + detail: 'Por favor, escriba algunos detalles', + name: { + required: 'Por favor, introduzca su nombre', + validName: 'Por favor, introduzca su nombre, los ayuntamientos necesitan esta información - si no quiere que su nombre se haga público en esta página web, borre la marca en la casilla de abajo' + }, + category: 'Por favor, seleccione una categoría', + rznvy: { + required: 'Por favor, introduzca su email', + email: 'Por favor, introduzca un email válido' + }, + email: { + required: 'Por favor, introduzca su email', + email: 'Por favor, introduzca un email válido' + }, + password: 'Por favor, introduzca la contraseña' + }, + strings: { + next: 'Siguiente', + untitled_draft: 'Borrador sin título', + login_error: 'Hubo un problema al abrir sesión. Por favor, inténtelo de nuevo más tarde.', + logout_error: 'Hubo un problema al cerrar sesión. Por favor, inténtelo de nuevo más tarde.', + login_details_error: 'Hubo un problema al abrir la sesión. Por favor, verifique su email y contraseña y que haya confirmado su contraseña.', + password_problem: 'Hubo un problema con la combinación de su email/contraseña. Si ha olvidado su contraseña, o no tiene una, puede configurarla volviendo a la pantalla de email, y seleccionado la opción configuración de contraseña. Las contraseñas no se activan hasta que no se haga click sobre el enlace en el email de confirmación.', + search_placeholder: 'Buscar un lugar o código postal', + location_error: 'Error de ubicación', + location_problem: 'Hubo un problema al buscar su ubicación.', + multiple_locations: 'Más de una ubicación corresponde a ese nombre. Seleccione una abajo o pruebe indicando el nombre de la calle y área, o un código postal.', + sync_error: 'Un error se ha generado al enviar su informe: ', + unknown_sync_error: 'Hubo un problema al enviar su informe. Por favor, inténtelo de nuevo más tarde.', + report_send_error: 'Hubo un problema al enviar su informe. Por favor, inténtelo de nuevo más tarde.', + missing_location: 'Por favor, indique una ubicación', + location_check_failed: 'Hubo un problema al verificar si cubrimos esta ubicación. Por favor, inténtelo de nuevo más tarde.', + category_extra_check_error: 'Hubo un problema al verificar si tenemos todos los detalles que necesitamos. Por favor, inténtelo de nuevo más tarde.', + locate_dismissed: 'Por favor, busque el nombre de la calle y área o código postal.', + geolocation_failed: "Lo sentimos, no pudimos establecer su ubicación con la precisión necesaria para mostrarle un mapa. Por favor, como alternativa, incluya una ubicación en la casilla de búsqueda", + geolocation_denied: 'No se pudo acceder a los servicios de ubicación. Por favor, verificar los permisos.', + select_category: '-- Seleccione una categoría --', + offline_got_position: 'Ubicación localizada.', + offline_failed_position: 'No se pudo obtener la ubicación.', + required: 'requerido(a)', + invalid_email: 'Email inválido', + invalid_report: 'Informe inválido', + photo_failed: 'Hubo un problema al tomar su foto.', + photo_added: 'Foto añadida', + photo_loading: 'Subir imágenes podría demorar, por favor tenga paciencia', + upload_aborted: 'Hubo un problema al subir su informe.', + try_again: 'Inténtelo nuevamente', + save_for_later: 'Guardar para más tarde', + no_connection: 'No hay conexión a la red disponible para enviar su informe. Por favor, inténtelo de nuevo más tarde.', + more_details: 'Más detalles' + } + }); +})(FMS, _); diff --git a/www/js/strings.js b/www/js/strings.js deleted file mode 100644 index 1dabd30..0000000 --- a/www/js/strings.js +++ /dev/null @@ -1,58 +0,0 @@ -(function (FMS, _) { - _.extend( FMS, { - validationStrings: { - update: 'Please enter a message', - title: 'Please enter a subject', - detail: 'Please enter some details', - name: { - required: 'Please enter your name', - validName: 'Please enter your full name, councils need this information - if you do not wish your name to be shown on the site, untick the box below' - }, - category: 'Please choose a category', - rznvy: { - required: 'Please enter your email', - email: 'Please enter a valid email' - }, - email: { - required: 'Please enter your email', - email: 'Please enter a valid email' - }, - password: 'Please enter a password' - }, - strings: { - next: 'Next', - untitled_draft: 'Untitled draft', - login_error: 'There was a problem logging you in. Please try again later.', - logout_error: 'There was a problem logging you out. Please try again later.', - login_details_error: 'There was a problem logging you in. Please check your email and password and that you have confirmed your password.', - password_problem: 'There was a problem with your email/password combination. If you have forgotten your password, or do not have one, you can set one by returning to the email screen and selecting the set password option. Passwords are not activated until the link in the confirmation email is clicked.', - search_placeholder: 'Search for a place or postcode', - location_error: 'Location error', - location_problem: 'There was a problem looking up your location.', - multiple_locations: 'More than one location matched that name. Select one below or try entering street name and area, or a postcode.', - sync_error: 'An error was encountered when submitting your report: ', - unknown_sync_error: 'There was a problem submitting your report. Please try again later.', - report_send_error: 'There was a problem submitting your report. Please try again.', - missing_location: 'Please enter a location', - location_check_failed: 'There was a problem checking we cover this location. Please try again later.', - category_extra_check_error: 'There was a problem checking if we have all the details we need. Please try again later.', - locate_dismissed: 'Please search for a street name and area, or postcode.', - geolocation_failed: "Sorry, but we weren't able to establish your location accurately enough to show you a map. Please enter a location in the search box instead", - geolocation_denied: 'Could not access location services. Please check permissions.', - select_category: '-- Pick a category --', - offline_got_position: 'Got location.', - offline_failed_position: 'Could not get location.', - required: 'required', - invalid_email: 'Invalid email', - invalid_report: 'Invalid report', - photo_failed: 'There was a problem taking your photo.', - photo_added: 'Photo added', - photo_loading: 'Uploading images may take some time, please be patient', - upload_aborted: 'There was a problem uploading your report.', - try_again: 'Try Again', - save_for_later: 'Save for Later', - no_connection: 'No network connection available for submitting your report. Please try again later.', - more_details: 'More details' - } - }); -})(FMS, _); -- cgit v1.2.3