Skip to content

Commit

Permalink
Ewsterrenburg vietnamese translations (#3999)
Browse files Browse the repository at this point in the history
* Add Vietnamese translation

* Removed erroneous comma

* Fixing tests
  • Loading branch information
mbarto authored Jul 23, 2019
1 parent c9a0b07 commit 3aec34d
Show file tree
Hide file tree
Showing 9 changed files with 2,051 additions and 9 deletions.
2 changes: 1 addition & 1 deletion web/client/components/I18N/__tests__/LangSelector-test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('LangSelector', () => {

const opts = cmpDom.childNodes;
const langs = {
'Italiano': 'it-IT', 'English': 'en-US', 'Français': 'fr-FR', 'Deutsch': 'de-DE', 'Español': 'es-ES', "中文": "zh-ZH", 'Nederlands': 'nl-NL', 'Hrvatski': 'hr-HR', 'Português': 'pt-PT'};
'Italiano': 'it-IT', 'English': 'en-US', 'Français': 'fr-FR', 'Deutsch': 'de-DE', 'Español': 'es-ES', "中文": "zh-ZH", 'Nederlands': 'nl-NL', 'Hrvatski': 'hr-HR', 'Português': 'pt-PT', "tiếng Việt": "vi-VN"};

for (let i = 0; i < opts.length; i++) {
lbl = opts[i].innerHTML;
Expand Down
Binary file added web/client/components/I18N/images/flags/vi-VN.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/client/components/I18N/images/flags/vi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe('test Layer Properties General module component', () => {
expect(comp).toExist();
const inputs = ReactTestUtils.scryRenderedDOMComponentsWithTag( comp, "input" );
expect(inputs).toExist();
expect(inputs.length).toBe(14);
expect(inputs.length).toBe(15);

});
it('tests Layer Properties Display component events', () => {
Expand All @@ -69,7 +69,7 @@ describe('test Layer Properties General module component', () => {
expect(comp).toExist();
const inputs = ReactTestUtils.scryRenderedDOMComponentsWithTag( comp, "input" );
expect(inputs).toExist();
expect(inputs.length).toBe(14);
expect(inputs.length).toBe(15);
ReactTestUtils.Simulate.change(inputs[0]);
expect(spy.calls.length).toBe(1);
});
Expand Down
2 changes: 1 addition & 1 deletion web/client/epics/__tests__/localconfig-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('localconfig Epics', () => {
const suppLocales = LocaleUtils.getSupportedLocales();
switch (action.type) {
case SUPPORTED_LOCALES_REGISTERED:
expect(Object.keys(suppLocales).length).toBe(9);
expect(Object.keys(suppLocales).length).toBe(10);
break;
default:
expect(true).toBe(false);
Expand Down
1,974 changes: 1,974 additions & 0 deletions web/client/translations/data.vi-VN

Large diffs are not rendered by default.

61 changes: 61 additions & 0 deletions web/client/translations/fragments/cookie/cookieDetails-vi-VN.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<!DOCTYPE html>
<html>
<body>
<div className="cookie-seeMore">
<h2 style="font-weight: bold">Cookies Policy</h2>
<hr />
<p style="line-height: 100%">
In accordance with Law Decree n° 196/2003, which replaced the Law n° 675/1996 concerning the protection of personal data, we inform you that by filling out this form and then sending this email message, you consent to the processing of your personal data (sensitive data will not be processed in any way) acquired by GeoSolutions SAS via electronic and/or automated tools. In any case, you can exercise your rights granted to you pursuant to Legislative Decree n° 196/2003 (data access, updates, integration, cancellation). Clicking the “Accept” button, you acknowledge that you have read this text and that you consent to the processing of your personal data. At any time you can ask the staff of GeoSolutions SAS web site to unsubscribe you from the service by following the instructions at the end of each message.
</p>
<h4 style="font-weight: bold">Cookies and how they Benefit You</h4>
<p style="line-height: 100%">Our website uses cookies, as almost all websites do, to help provide you with the best experience we can. Cookies are small text files that are placed on your computer or mobile phone when you browse websites</p>
<p style="line-height: 100%">Our cookies help us:</p>
<ul>
<li>Make our website work as you’d expect</li>
<li>Remember your settings during and between visits</li>
<li>Improve the speed/security of the site</li>
<li>Allow you to share pages with social networks like Facebook</li>
</ul>
<p style="line-height: 100%">We do not use cookies to:</p>
<ul>
<li>Collect any personally identifiable information (without your express permission)</li>
<li>Collect any sensitive information (without your express permission)</li>
<li>Pass data to advertising networks</li>
<li>Pass personally identifiable data to third parties</li>
<li>Pay sales commissions</li>
</ul>
<p style="line-height: 100%">You can learn more about all the cookies we use below.</p>
<p style="line-height: 100%">If the settings on your software that you are using to view this website (your browser) are adjusted to accept cookies we take this, and your continued use of our website, to mean that you are fine with this. Should you wish to remove or not use cookies from our site you can learn how to do this below, however doing so will likely mean that our site will not work as you would expect.</p>

<h4 style="font-weight: bold">Our own cookies</h4>
<p style="line-height: 100%">We use cookies to make our website work including:</p>
<ul>
<li>Remembering your search settings</li>
<li>Authentication to WMS, WFS, WPS via HTTP requests</li>
</ul>
<p style="line-height: 100%">There is no way to prevent these cookies being set other than to not use our site.</p>
<h4 style="font-weight: bold">Third Party Cookies</h4>
<p style="line-height: 100%">Our site, like most websites, includes functionality provided by third parties. A common example is an embedded YouTube video. Our site includes the following which use cookies:</p>
<ul>
<li><a href="http://www.google.it/intl/en/policies/privacy/" target="_blank">Google</a></li>
<li><a href="https://www.cloudflare.com/cookie-policy/" target="_blank">Cloudflare</a></li>
</ul>
<h4 style="font-weight: bold">Social Website Cookies</h4>
<p style="line-height: 100%">So you can easily like or share our content on the likes of Facebook and Twitter we have included sharing buttons on our site. Cookies are set by:</p>
<ul>
<li>Twitter</li>
<li>Facebook</li>
<li>Linkedin</li>
<li>Google +</li>
</ul>
<p style="line-height: 100%">The privacy implications on this will vary from social network to social network and will be dependent on the privacy settings you have chosen on these networks.</p>
<h4 style="font-weight: bold">Turning Cookies Off</h4>
<p style="line-height: 100%">
You can usually switch cookies off by adjusting your browser settings to stop it from accepting cookies (learn how <a href="http://www.attacat.co.uk/resources/cookies/how-to-ban" target="_blank"> here</a>.). Doing so however will likely limit the functionality of our’s and a large proportion of the world’s websites as cookies are a standard part of most modern websites.
</p>
<p style="line-height: 100%">
It may be that you concerns around cookies relate to so called “spyware”. Rather than switching off cookies in your browser you may find that anti-spyware software achieves the same objective by automatically deleting cookies considered to be invasive. Learn more about <a href="http://www.attacat.co.uk/resources/cookies/how-to-control-your-online-privacy" target="_blank"> managing cookies with antispyware software</a>.
</p>
</div>
</body>
</html>
13 changes: 10 additions & 3 deletions web/client/utils/LocaleUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ const nl = require('react-intl/locale-data/nl');
const zh = require('react-intl/locale-data/zh');
const hr = require('react-intl/locale-data/hr');
const pt = require('react-intl/locale-data/pt');
addLocaleData([...en, ...it, ...fr, ...de, ...es, ...nl, ...zh, ...hr, ...pt]);
const vi = require('react-intl/locale-data/vi');
addLocaleData([...en, ...it, ...fr, ...de, ...es, ...nl, ...zh, ...hr, ...pt, ...vi]);

/*
* it, en, fr, de, es are the default locales and it is preferrable to customize them via configuration.
Expand Down Expand Up @@ -60,6 +61,10 @@ let supportedLocales = {
"pt": {
code: "pt-PT",
description: "Português"
},
"vi": {
code: "vi-VN",
description: "tiếng Việt"
}
};
const DATE_FORMATS = {
Expand All @@ -69,7 +74,8 @@ const DATE_FORMATS = {
"nl-NL": "DD/MM/YYYY",
"zh-ZH": "YYYY/MM/DD",
"hr-HR": "DD/MM/YYYY",
"pt-PT": "DD/MM/YYYY"
"pt-PT": "DD/MM/YYYY",
"vi-VN": "DD/MM/YYYY"
};

let errorParser = {};
Expand All @@ -80,7 +86,7 @@ let errorParser = {};
*/
const LocaleUtils = {
ensureIntl(callback) {
require.ensure(['intl', 'intl/locale-data/jsonp/en.js', 'intl/locale-data/jsonp/it.js', 'intl/locale-data/jsonp/fr.js', 'intl/locale-data/jsonp/de.js', 'intl/locale-data/jsonp/es.js', 'intl/locale-data/jsonp/nl.js', 'intl/locale-data/jsonp/zh.js', 'intl/locale-data/jsonp/hr.js'], (require) => {
require.ensure(['intl', 'intl/locale-data/jsonp/en.js', 'intl/locale-data/jsonp/it.js', 'intl/locale-data/jsonp/fr.js', 'intl/locale-data/jsonp/de.js', 'intl/locale-data/jsonp/es.js', 'intl/locale-data/jsonp/nl.js', 'intl/locale-data/jsonp/zh.js', 'intl/locale-data/jsonp/hr.js', 'intl/locale-data/jsonp/vi.js'], (require) => {
global.Intl = require('intl');
require('intl/locale-data/jsonp/en.js');
require('intl/locale-data/jsonp/it.js');
Expand All @@ -91,6 +97,7 @@ const LocaleUtils = {
require('intl/locale-data/jsonp/zh.js');
require('intl/locale-data/jsonp/hr.js');
require('intl/locale-data/jsonp/pt.js');
require('intl/locale-data/jsonp/vi.js');
if (callback) {
callback();
}
Expand Down
4 changes: 2 additions & 2 deletions web/client/utils/__tests__/LocaleUtils-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ describe('LocaleUtils', () => {
expect(LocaleUtils.getDateFormat("pt-PT")).toBe("DD/MM/YYYY");
});
it('test the defaults for DATE_FORMATS', () => {
expect(Object.keys(LocaleUtils.DATE_FORMATS).length).toBe(7);
expect(Object.keys(LocaleUtils.DATE_FORMATS)).toEqual(["default", "en-US", "it-IT", "nl-NL", "zh-ZH", "hr-HR", "pt-PT"]);
expect(Object.keys(LocaleUtils.DATE_FORMATS).length).toBe(8);
expect(Object.keys(LocaleUtils.DATE_FORMATS)).toEqual(["default", "en-US", "it-IT", "nl-NL", "zh-ZH", "hr-HR", "pt-PT", "vi-VN"]);
});
});

0 comments on commit 3aec34d

Please sign in to comment.