Default locale is always loaded, removed untraslated files

This commit is contained in:
Juan Ferrer Toribio 2018-01-03 16:35:03 +01:00
parent 8ed92bed44
commit 41b9352455
31 changed files with 82 additions and 510 deletions

20
app.js
View File

@ -20,10 +20,8 @@ window.onload = function ()
function main (req)
{
var keys = req.keys ();
for (var i = 0; i < keys.length; i++)
Vn.Locale.add (req (keys[i]));
if (req)
onLocaleLoad (req);
hederaWeb = new Hedera.App ();
hederaWeb.run ();
@ -34,6 +32,9 @@ function loadLocale (cb)
Vn.Locale.init ();
var lang = Vn.Locale.language;
var req = require.context ('js', true, /locale\/en.json$/);
onLocaleLoad (req);
switch (lang)
{
case 'ca':
@ -57,7 +58,14 @@ function loadLocale (cb)
cb (require.context ('js', true, /locale\/pt.json$/)); });
break;
default:
require ([], function () {
cb (require.context ('js', true, /locale\/en.json$/)); });
cb ();
}
}
function onLocaleLoad (req)
{
var keys = req.keys ();
for (var i = 0; i < keys.length; i++)
Vn.Locale.add (req (keys[i]));
}

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
hedera-web (1.405.60) stable; urgency=low
hedera-web (1.405.61) stable; urgency=low
* Initial Release.

View File

@ -1,11 +0,0 @@
{
"Addresses": "Addresses"
,"Return": "Return"
,"AddAddress": "Add address"
,"SetAsDefault": "Set as default"
,"RemoveAddress": "Remove address"
,"EditAddress": "Edit address"
,"AreYouSureDeleteAddress": "Are you sure you want to delete the address?"
}

View File

@ -1,15 +0,0 @@
{
"AddEditAddress": "Add or edit address"
,"Name": "Consignee"
,"Address": "Address"
,"City": "City"
,"ZipCode": "Zip code"
,"Country": "Country"
,"Province": "Province"
,"Return": "Return"
,"Accept": "Accept"
,"AddressChangedSuccessfully": "Address changed successfully"
}

View File

@ -1,30 +0,0 @@
{
"Configuration": "Configuration"
,"Username": "Username"
,"Password": "Password"
,"Email": "Email"
,"Billing": "Billing"
,"Receive invoices by email": "Receive invoices by email"
,"Old password": "Old password"
,"New password": "New password"
,"Repeat password": "Repeat password"
,"Info": "Info"
,"Modify": "Modify"
,"Password requirements": "Password requirements"
,"characters long": "characters long"
,"alphabetic characters": "alphabetic characters"
,"capital letters": "capital letters"
,"digits": "digits"
,"symbols": "symbols. Ej: $%&."
,"Password changed!": "Password changed!"
,"Password doesn't meet the requirements": "Password doesn't meet the requirements, press info button for more details"
,"Passwords doesn't match": "Passwords doesn't match"
,"Passwords empty": "Passwords empty"
,"Addresses": "Addresses"
,"Change password": "Change password"
}

View File

@ -1,15 +0,0 @@
{
"AccessLog": "Access log"
,"UserNumber:": "User Number:"
,"User:": "User:"
,"Phone:": "Phone:"
,"Mobile:": "Mobile:"
,"Access": "Access"
,"OS": "OS"
,"Browser": "Browser"
,"Version": "Version"
,"Javascript": "Javascript"
,"Cookies": "Cookies"
}

View File

@ -1,4 +0,0 @@
{
"Items": "Items",
"Enter a search term": "Enter a search term"
}

View File

@ -1,6 +0,0 @@
{
"ControlPanel": "Control panel"
,"Module": "Module"
,"Description": "Description"
}

View File

@ -1,17 +0,0 @@
{
"Images": "Images"
,"Collection": "Collection"
,"Click or drop files here": "Click or drop files here"
,"Clear all": "Clear all"
,"Upload files": "Upload files"
,"Waiting for upload": "Waiting for upload"
,"Uploading file": "Uploading file"
,"Image uploaded": "Image uploaded"
,"Upload finished successfully": "Upload finished successfully"
,"Some errors happened on upload": "Some errors happened on upload"
,"There are no files to upload": "There are no files to upload"
}

View File

@ -1,11 +0,0 @@
{
"Queries": "Queries"
,"Execute": "Execute"
,"Clean": "Clean"
,"SQL query": "SQL query"
,"Updatable": "Updatable"
,"Query executed!": "Query executed!"
}

View File

@ -1,7 +0,0 @@
{
"User management": "User management"
,"Disabled": "Disabled"
,"Impersonate user": "Impersonate user"
,"Access log": "Access log"
}

View File

@ -1,9 +0,0 @@
{
"ListByAgency": "Bundles by agency"
,"ShowByProvince": "Show breakdown by province"
,"Agency": "Agency"
,"Exps": "Exps."
,"Bundles": "Bundles"
,"Prevision": "Prev."
}

View File

@ -1,10 +0,0 @@
{
"ByProvince": "Breakdown by province"
,"Return": "Return"
,"SelectAgency": "Select an agency"
,"Province": "Province"
,"Expeditions": "Exps."
,"Left": "Left"
}

View File

@ -1,47 +0,0 @@
{
"QualityAndVariety": "Quality, variety and service"
,"MaximumFreshness": "Verdnatura offers a product guarantee maximum freshness thanks to their daily flowers and plants from Holland, South America, or from the same producer receptions."
,"SquareMeters": "Over facilities 13,000m"
,"AboutRealms": "With cut flowers, green, artificial and accessories"
,"AboutLocation": "Settled in Valencia, Madrid, Barcelona, Holland and France, we offer direct sales in our facilities and distribution throughout Spain by own service or agency."
,"PurchaseThroughWeb": "Purchase through our website and receive your order comfortably in your florist.In less than 24 hours!"
,"WhatMakeUsDifferent": "What makes us different?"
,"DesignVariety": "The variety in design, quality of materials used and our service delivery, will provide a showcase of dynamic genre, always fresh and appealing."
,"AdaptToYourNeeds": "Verdnatura adapts to the needs of each customer by offering a wide range of products, always guaranteed."
,"TheBestQuality": "The best quality at the best price. Without forgetting the design."
,"AtYourService": "We are at your service"
,"BuyersAndTraders": "9 specialized trade buyers and our 20 advise you on everything you need."
,"Verdnatura training": "Verdnatura training"
,"GoodTraining": "In Verdnatura we know that a good education is essential for the optimal development of any activity, and of course, also the florist."
,"SpecialTrainingPrices": "For the school budget does not affect the quality of your training, we work with special pricing policy for all schools that request it take courses in our facilities Verdnatura chair."
,"YoutubeChannel": "And do not miss Verdnatura videos on Youtube Channel. Where you'll find plenty of interesting tips on handling of the flower."
,"HowWeWork": "How we work?"
,"FirstQualityControl": "First quality control"
,"SecondQualityControl": "Second quality control"
,"ThirdQualityControl": "Third quality control"
,"FourthQualityControl": "Fourth quality control"
,"AalsmeerAuction": "At 5: 00h, our purchasing managers acquire, in the auction of Aalsmeer and Noaldwijk, gender, the producer has reaped the previous day."
,"BeforeAuction": "After purchase, the genre quickly enters Verdnatura Holland BV, our company Flora Holland in Aalsmeer."
,"DirectlyFromProviders": "Besides buying through the Dutch auction, we buy directly from producers Colombia, Ecuador, Thailand, Malaysia, Africa and Australia. These products are directly supervised by our delegates Purchase located in each area. This merchandise will travel to Amsterdam, subjected to a process Vaacum and in less than two hours after landing, you will be at our facility in Aalsmeer."
,"GoodsDischarge": "At 7: 00h our fellow Aalsmeer start receiving the purchased goods, having a first quality control, and creating it in stock. Now available for our customers on the web."
,"GoodsTravel": "The goods travel for a day and a half trucks watertight compartments at different temperatures, so that the cold chain is not broken trip in the best conditions."
,"GoodsReception": "Upon receipt of the merchandise responsible for the purchase reviewed state that arrives, accepting or rejecting it as appropriate, it discharged cold and quickly enters our camera."
,"CustomerOrders": "Our customers can place their orders via the web, by phone or coming directly to our facilities. We have a team of specialized commercial advise you on your purchase and inform you the latest news and articles that may be of interest, so that your purchase meets your needs and stay totally satisfied."
,"AfterOrder": "Once placed the order, turn to the production department. During the preparation of this new quality control (third) in which the poor will be discarded merchandise it is made."
,"BuyerControl": "As the preparation is completed, a new control (fourth) where a specialist account is made and check the status of products. If they do not meet the quality standards required rejects and replaces the right."
,"EmbeddedSection": "Then takes embedded section, where the order is suitable for proper delivery. Each type of delivery requires a method suitable for embedded gender protected books and reaches the customer in perfect condition."
,"AfterEmbedAgency": "Once the product has been fitted it is stored again in the chamber until they leave by agency or own deal, receiving the customer within 24 hours in the case of the agency or the same day for the cast, comfortably at home ."
,"FreshnessGuaranteed": "This way of working ensures freshness by rapid processes and maintaining the cold chain from purchase to receipt by our customer."
,"AboutSummary": "75 people spread over almost everybody so that our client has the broadest portfolio in the industry, coolest flower, plant newest, latest accessories, and fastest service possible."
}

View File

@ -1,20 +0,0 @@
{
"IWantCustomer": "I want to be a customer!"
,"FillFormData": "Fill the form with your details and we will contact you soon."
,"OrCallUs": "Or if you prefer, call us at 963 242 100."
,"AllFieldsMandatory": "* All fields are mandatory."
,"Name": "Name"
,"Surname": "Surname"
,"EMail": "Email"
,"Message": "Message"
,"Address": "Address"
,"PC": "Zip code"
,"City": "City"
,"Phone": "Phone"
,"Send": "Send"
,"DataSentSuccess": "Your details have been sent successfully. Shortly we will contact you."
,"ErrorSendingData": "Failed to send the data. Please check that you have filled in all the fields and you entered the anti-spam code correctly."
}

View File

@ -1,3 +0,0 @@
{
"ShowMap": "Show map"
}

View File

@ -1 +0,0 @@
{}

View File

@ -1,25 +0,0 @@
{
"AboutCompany": "Why Verdnatura?"
,"StorePhoto": "Store photo"
,"BecauseOurBigCatalog": "Because we have the largest catalog in the sector, renewed daily."
,"BecauseThisWeb": "Because this website, with real time stock always at your disposal."
,"BecauseOurShoppingDep": "For our purchasing department with 9 specialized buyers."
,"BecauseOrderIsEasy": "Because it is very easy to place your order by web, phone or coming."
,"BecauseOurPlant": "Because our premises, come and visit us. You'll love."
,"BecauseOurSalesDep": "For our commercial department, with professionals who will always find a solution to your needs."
,"BecauseOurWorkShop": "Because we have a sewing shop to help you."
,"BecauseWeHaveWhatYouNeed": "Because we have what you need when you need it ..."
,"AboutDesc":
"We are a company engaged in the wholesale and distribution of a wide range of accessories, greens and flowers to florists or other wholesalers."
,"AboutService":
"We have home delivery service with our vehicles throughout the province of Valencia and limited areas of Castellón, Alicante, Murcia, Albacete and Madrid send the rest of the peninsula by transportation agencies with 24/48 hours service (Zeleris, via express) . We also do direct sales to florists in any of our facilities."
,"AboutDisp":
"Our company has over 50 employees and several branches. The main is located in Valencia and has more than 8000 m2. We also have a warehouse located in Mercaflor - Mercavalencia (Valencia) that perform direct sales only."
,"AboutOrder":
"You can make your orders and reservations by telephone at 96 324 21 00, online through our website or directly in our facilities."
}

View File

@ -1,29 +0,0 @@
{
"ShoppingBasket": "Shopping basket"
,"Delete": "Delete order"
,"GoToCatalog": "Go to catalog"
,"ConfigureOrder": "Configure order"
,"Checkout": "Checkout"
,"OrderNumber": "Order number"
,"DateExit": "Shipping date"
,"Warehouse": "Store"
,"OrderTotal": "Total"
,"Amount": "Amount"
,"Pack": "Pack"
,"Stems": "Stems"
,"Avail": "Avail"
,"Item": "Item"
,"Cat": "Cat"
,"S1": "Siz"
,"Color": "Color"
,"Origin": "Origin"
,"Price": "Price"
,"Disc": "Desc"
,"Subtotal": "Subtotal"
,"Order items updated": "Your order takes too long and has been updated, prices or quantities of your items may have changed"
,"RememberReconfiguringImpact": "Remember that if you reconfigure your order prices or quantities of your items may change"
}

View File

@ -1,57 +0,0 @@
{
"Catalog": "Catalog"
,"SearchResults": "Search results"
,"SelectFamily": "Select family"
,"Choose filter from right menu": "Choose a filter from the right menu"
,"Choose a realm": "Choose a realm"
,"ArticleNotFound": "Item not found"
,"ArticleNotAvailable": "Item not available"
,"List view": "List view"
,"Grid view": "Grid view"
,"Switch view": "Switch view"
,"StartOrder": "Start order"
,"ShoppingBasket": "Shopping basket"
,"Agency": "Agency"
,"Warehouse": "Warehouse"
,"Filter by": "Filter by"
,"Order by": "Order by"
,"Search": "Search"
,"Change": "Change"
,"Available": "Available"
,"Size": "Size"
,"Realm": "Realm"
,"Family": "Family"
,"Color": "Color"
,"Producer": "Producer"
,"Origin": "Origin"
,"Category": "Category"
,"Remove filters": "Remove filters"
,"Relevancy": "хамаарал"
,"Price": "Price"
,"Amount": "Amount"
,"Name": "Name"
,"Pack": "Pack"
,"Lower price": "Lower price"
,"Higher price": "Higher price"
,"Lower size": "Lower size"
,"Higher size": "Higher size"
,", %.0d Units": ", %.0d Units"
,"from": "from"
,"from %.2d€": "from %.2d€"
,"AddToBasket": "Add to basket"
,"Add": "Add"
,"Erase": "Remove"
,"Confirm": "Confirm"
,"IndicativePhotos": "* Photos are indicative"
,"Added%dOf%s": "Added %d of %s"
,"NoMoreAmountAvailable": "No more amount available"
}

View File

@ -1,30 +0,0 @@
{
"ConfigureOrder": "Configure order"
,"Cancel": "Cancel"
,"Next": "Next"
,"DeliveryOrPickupQuestion": "Do you want to receive or pickup the order?"
,"ReceiveThroughtAgency": "Receive by agency"
,"ReceiveThroughtRoute": "Verdnatura delivery"
,"PickupInStore": "Store pickup"
,"OrderDateDeliveryQuestion": "What day you want to receive the order?"
,"OrderDatePickupQuestion": "What day you want to pickup your order?"
,"AddressQuestion": "Where do you want to receive the order?"
,"AgencyQuestion": "By wich agency you want to receive the order?"
,"PickupWarehouseQuestion": "What store you want to pickup your order?"
,"ConfirmToAccessCatalog": "Confirm the data to access the catalog"
,"Arrival": "Arrival"
,"Pickup": "Pickup"
,"Agency": "Agency"
,"Warehouse": "Store"
,"Confirm": "Confirm"
,"OrderStarted": "Order started"
,"OrderUpdated": "Order updated"
,"NoAgeciesAvailableForDate": "No agencies available for the selected date and consignee, change the shipping date of your order"
,"NoWarehousesAvailableForDate": "No stores available for the selected date, change the pickup date of you order"
}

View File

@ -1,36 +0,0 @@
{
"Checkout": "Checkout"
,"Order summary": "Order summary"
,"Delivery at": "Delivery at"
,"Agency": "Agency"
,"Warehouse": "Store"
,"Previous balance": "Previous balance"
,"Order total": "Order total"
,"Order VAT": "Order VAT"
,"Total debt": "Total debt"
,"Credit": "Credit"
,"Exceeded credit": "Exceeded credit"
,"Amount to pay": "Amount to pay"
,"Pay method": "Pay method"
,"Use my balance": "Use my balance"
,"You have a favorable balance.": "You do not need to perform any payment, you have a favorable balance."
,"Use my credit": "Use my credit"
,"You have a favorable credit.": "You do not need to pay now, you have a favorable credit."
,"Credit card": "Credit card"
,"You will be redirected to the payment.": "By confirming the order you will be redirected to the payment platform."
,"Bank Transfer": "Bank Transfer"
,"Make a transfer to one account.": "Make a transfer to one of the following accounts and send the receipt to your salesperson."
,"Pay later": "Pay later"
,"Modify": "Modify"
,"Confirm": "Confirm"
,"Order confirmed successfully": "Your order has been confirmed successfully"
,"Accept": "Accept"
,"You have exceeded your credit.": "You have exceeded your credit, in order to prepare your order please pay your debt."
}

View File

@ -1,8 +0,0 @@
{
"Invoices": "Invoices"
,"Serial": "Serial"
,"Date": "Date"
,"Import": "Import"
,"Download PDF": "Download PDF"
}

View File

@ -1,23 +0,0 @@
{
"OrderDetail": "Order detail"
,"Print delivery note": "Print delivery note"
,"Delivery": "Delivery"
,"Total": "Total"
,"Total + tax": "Total + tax"
,"Tax base": "Tax base"
,"VAT": "VAT"
,"ItemNumber": "Item number"
,"Amount": "Amount"
,"Item": "Item"
,"Category": "Category"
,"S1": "Siz"
,"Stems": "Stems"
,"Color": "Color"
,"Origin": "Origin"
,"Price": "Price"
,"Disc": "Disc"
,"Subtotal": "Subtotal"
}

View File

@ -1,13 +0,0 @@
{
"AddEditNew": "Add or edit new"
,"Title": "Title"
,"NewBody": "New body"
,"Tag": "Tag"
,"Priority": "Priority"
,"Return": "Return"
,"Accept": "Accept"
,"NewChangedSuccessfully": "New changed successfully"
}

View File

@ -1,12 +0,0 @@
{
"NewsManagement": "News management"
,"AddNew": "Add new"
,"EditNew": "Edit new"
,"NewNum": "New number"
,"Date": "Date"
,"Author": "Author"
,"Title": "Title"
,"Priority": "Priority"
}

View File

@ -1,9 +0,0 @@
{
"Item list": "Item list"
,"Store": "Store"
,"Realm": "Realm"
,"Rate": "Rate"
,"Preview": "Preview"
}

View File

@ -1,21 +0,0 @@
{
"Configuration": "Configuration"
,"Select config": "Select config"
,"Reign": "Reign"
,"Family": "Family"
,"Store": "Store"
,"Date": "Date"
,"Shelf": "Shelf"
,"Name prefix": "Name prefix"
,"Limit amount per item": "Limit amount per item"
,"Title": "Title"
,"Show packing": "Show packing"
,"Stack different items": "Stack different items"
,"Preview": "Preview"
,"Pallets": "Pallets"
,"No items found, check that all fields are correct":
"No items found, check that all fields are correct"
}

View File

@ -1,7 +0,0 @@
{
"ConnError": "Connection failed"
,"BadServerReply": "Bad server reply"
,"ModelNotUpdatable": "Model not updatable"
,"RowNotExists": "The record does not exist or has been deleted"
,"ColNotExists": "The column does not exist"
}

View File

@ -7,13 +7,14 @@ vnLocaleStrings = {};
module.exports =
{
language: null
,defaultLang: 'en'
,init: function ()
{
if (this.language)
return;
var language = 'en';
var language = this.defaultLang;
var languages = navigator.languages;
if (languages && languages.length > 0)
@ -28,12 +29,72 @@ module.exports =
{
this.init ();
var file = path +'/locale/'+ this.language +'.json'+ Vn.getVersion ();
var data = {
path: path,
callback: callback,
defOk: false,
orgOk: this.defaultLang === this.language
};
data.def = this.createRequest (data, true, this.defaultLang);
if (!data.orgOk)
data.org = this.createRequest (data, false, this.language);
}
,createRequest: function (data, isDef, lang)
{
var langFile = this.getLocalePath (data.path, lang);
var request = new XMLHttpRequest ();
request.open ('get', file, true);
request.onreadystatechange = this.loadDone.bind (this, request, callback);
request.open ('get', langFile, true);
request.onreadystatechange =
this.onRequestReady.bind (this, request, data, isDef);
request.send ();
return request;
}
,onRequestReady: function (request, data, isDef)
{
if (request.readyState != 4)
return;
if (isDef)
{
this.loadFromRequest (request);
data.defOk = true;
}
else
data.orgOk = true;
if (data.orgOk && data.defOk)
{
if (data.org != null)
this.loadFromRequest (data.org)
if (data.callback)
data.callback ();
}
}
,loadFromRequest: function (request)
{
if (request.status !== 200)
return false;
try {
this.add (JSON.parse (request.responseText));
return true;
}
catch (e) {
console.error (e);
}
return false
}
,getLocalePath: function (path, lang)
{
return path +'/locale/'+ lang +'.json'+ Vn.getVersion ();
}
,loadScript: function (path, callback)
@ -42,27 +103,6 @@ module.exports =
Vn.includeJs (path +'/locale/'+ this.language, callback);
}
,loadDone: function (request, callback)
{
if (request.readyState != 4)
return;
var success = false;
if (request.status == 200)
{
try {
this.add (JSON.parse (request.responseText));
success = true;
}
catch (e) {
console.log ('Locale: %s', e);
}
}
callback (success);
}
,add: function (translations)
{
for (var str in translations)
@ -73,6 +113,6 @@ module.exports =
window._ = function (stringId)
{
var string = vnLocaleStrings[stringId];
return (string) ? string : stringId;
return string ? string : stringId;
}

View File

@ -1,6 +1,6 @@
{
"name": "hedera-web",
"version": "1.405.60",
"version": "1.405.61",
"description": "Verdnatura web page",
"license": "GPL-3.0",
"repository": {