Commit 03d5a2d3 authored by Matija Obreza's avatar Matija Obreza
Browse files

i18n: Added zh-TW language

Fixed i18next options
parent 2aa7bc2c
......@@ -31,6 +31,7 @@ Add a container `<div>` to your HTML page and initialize the Genesys UI with the
clientId: 'clientid@genesys', // Client ID
clientKey: 'changeme', // Client key
title: 'Genesys:', // HTML title prefix
language: 'en', // Display Embedded Genesys in: en, es, zh-TW
filter: {
institute: { code: [ 'ETH013' ] }, // Genesys data filter
},
......@@ -74,7 +75,7 @@ to *@geneesys-pgr/ui-embedded*:
|`clientId` | **Required** | Please contact helpdesk@genesys-pgr.org to obtain API keys for use in your environment.<br />The API keys are limited to your website and will not work on a different domain. |
|`clientSecret` | **Required** | Ditto. |
|`filter` |`undefined` | Allows for narrowing the scope of requested accession data from Genesys API. <br />To filter for accessions from your genebank, use: `{ institute: { code: ['XXX000'] } }` with the FAO WIEWS Code of your genebank. Default `undefined` value will return all accessions. |
|`language`|*en*| Specify the language of the user interface.<br />Fully supported: `en`<br />Partially supported: `es` |
|`language`|*en*| Specify the language of the user interface.<br />Fully supported: `en`, `zh-TW`<br />Partially supported: `es` |
|`title`| *Genesys:* | HTML page title prefix |
| `accession` | `{ ... }` | See *Accession* configuration options |
| `shoppingCart` | `{ ... }` | See *Shopping cart* configuration options |
......@@ -124,3 +125,22 @@ The map is **disabled by default**. To allow users to see map of accession colle
|`baseMap.url`|[World_Light_Gray_Base](https://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}/)| Tile server url for the map base layer. |
|`baseMap.attribution`|Tiles &copy; ...| Base layer attribution. |
# Translating Embedded Genesys
Help us make *Embedded Genesys* available in your language or improve the current translations at
**https://www.transifex.com/crop-trust/embedded-genesys/content/**
We welcome your contributions!
# License and Disclaimer
This software is licensed under the Apache License, Version 2.0 (the "License").
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
......@@ -16,6 +16,8 @@ const genesysConfig: Config = {
filter: { institute: { code: [ 'COL003', 'BEL084', 'ETH013' ] } },
accession: {
pdci: true,
subsets: true,
datasets: true,
},
shoppingCart: {
enabled: true,
......
......@@ -37,6 +37,9 @@
<li class="nav-item">
<a class="nav-link" href="?es">ES</a>
</li>
<li class="nav-item">
<a class="nav-link" href="?zh-TW">ZH-TW</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#/api-info">API Info</a>
</li>
......
......@@ -42,7 +42,10 @@
<a class="nav-link" href="index.html">EN</a>
</li>
<li class="nav-item">
<a class="nav-link" href="index.html?es">ES*</a>
<a class="nav-link" href="index.html?es">ES</a>
</li>
<li class="nav-item">
<a class="nav-link" href="index.html?zh_TW">ZH_TW</a>
</li>
</ul>
</div>
......
......@@ -3,12 +3,14 @@ import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import transEn from 'locales/en/translations.json';
import transEs from 'locales/es/translations.json';
import transZhTw from 'locales/zh-TW/translations.json';
// import transRu from 'locales/ru/translations.json';
// Bundled resources
const resources = {
en: { translations: { ...transEn } },
es: { translations: { ...transEs } },
"zh-tw": { translations: { ...transZhTw } },
// ru: { translations: { ...transRu } },
};
// console.log('Translations', resources);
......@@ -27,14 +29,17 @@ const initI18n = (language = 'en') => {
// .use(HttpApi)
.use(initReactI18next) // passes i18n down to react-i18next
.init({
// debug: true,
lng: language,
lowerCaseLng: true,
// supportedLngs: [ 'en', 'es', 'zh-TW' ],
nonExplicitSupportedLngs: true,
fallbackLng: 'en',
ns: ['translations' ],
defaultNS: 'translations',
// fallbackNS: ''
preload: [],
load: 'languageOnly',
load: 'all',
react: {
useSuspense: false,
},
......
{
"loading": "讀取中...",
"label": {
"andMore": "已及 {{otherMore, number}} 更多"
},
"action": {
"submit": "送出"
},
"pag": {
"first": "第一",
"prev": "前",
"next": "次",
"last": "最後"
},
"pagetitle": {
"accessionList": "品系列表",
"accession": "品系{{accessionNumber}}",
"cart": "購物車",
"overview": "館藏概覽",
"apiInfo": "API資訊"
},
"error": {
"notFound": "未尋得",
"errorHappened": "處理申請時發生錯誤"
},
"list": {
"availability": "可否申請",
"notAvailable": "不可申請"
},
"estimatedNumberOfItems": "{{count, number}} {{what, lowercase}}",
"accession": {
"model": "品系",
"model_plural": "引系",
"historicalNote": "此為品系歷史紀錄",
"doi": "品系 DOI",
"crop": "作物",
"cropName": "作物名稱",
"acceNumb": "品系號碼",
"accessionName": "品系名稱",
"alias": {
"OTHERNUMB": "其他標識符",
"ACCENAME": "品系名稱",
"DONORNUMB": "捐贈者品系號碼",
"COLLNUMB": "採集編號"
},
"taxonomy": {
"genus": "屬",
"species": "特殊加詞",
"scientificName": "學名",
"genusSpecies": "種",
"subtaxa": "亞分類群",
"synonyms": "同物異名",
"grinTaxonName": "吻合的 GRIN 分類群",
"grinCurrentName": "先前的 GRIN 分類群"
},
"holdingInstitute": "擁有機構",
"instituteCode": "機構代碼",
"genus": "屬",
"countryOfOrigin": "材料來源",
"species": "特殊加詞",
"sampStat": "生物狀態",
"storageType": "種源倉儲形態",
"datasets": "資料集",
"subsets": "次集",
"details": {
"providedTaxonomy": "分類學",
"metadata": "元資料",
"collSite": "採集站點",
"geo": "地理參考",
"images": "影像",
"uuid": "UUID",
"permanentURL": "永久網址",
"lastUpdated": "最後更新",
"created": "建立",
"pdci": "護照資料完整性指數",
"pdciScore": "品系的PDCI指數為 {{score, number}} 滿分為10.0",
"safetyDuplicationInstitute": "安全備份機構",
"accessionNames": "品系名稱",
"remarks": "備註"
},
"filters": {
"fullText": "全文檢索",
"historical": "包含歷史材料",
"available": "僅可申請材料"
},
"overview": {
"title": "館藏概覽",
"about": "約 {{count, number}} {{what, lowercase}}",
"total": "總計",
"Other": "其他",
"Not specified": "未標明",
"NULL": "資料未紀錄",
"institute code": "擁有機構",
"institute country code3": "擁有機構國別",
"crop shortName": "作物",
"cropName": "作物名稱",
"sampStat": "品系生物狀態",
"taxonomy genus": "提供Genesys之屬名",
"taxonomy genusSpecies": "提供Genesys之種名",
"taxonomy grinTaxonomySpecies": "吻合的 GRIN 分類群",
"taxonomy currentTaxonomySpecies": "先前的 GRIN 分類群",
"countryOfOrigin code3": "材料來源",
"donorCode": "捐贈者機構之FAO WIEWS代碼",
"mlsStatus": "ITPGRFA 多邊系統",
"available": "可申請配送",
"duplSite": "安全備份站點",
"breederCode": "育種者代碼",
"sgsv": "安全備份於斯瓦爾巴",
"storage": "種源倉儲形態",
"aegis": "AEGIS"
},
"coll": {
"collCode": "採集機構代碼",
"collNumb": "採集編號",
"collDate": "樣本採集日期",
"collMissId": "採集任務標示",
"collName": "採集機構名稱",
"collSite": "採集站點位置",
"collSrc": "館藏來源"
},
"geo": {
"latitude": "採集地點緯度",
"longitude": "採集地點經度",
"uncertainty": "座標模糊度",
"datum": "大地基準",
"method": "地理配準方法",
"elevation": "採集點海拔"
},
"storage": {
"10": "種子蒐集",
"11": "短期種子館藏",
"12": "中期種子館藏",
"13": "長期種子館藏",
"20": "田間館藏",
"30": "試管內館藏",
"40": "冷凍保存館藏",
"50": "DNA 館藏",
"99": "其他"
},
"sampleStatus": {
"100": "野生",
"110": "天然",
"120": "近天然/野生",
"130": "近天然/播種",
"200": "雜草",
"300": "傳統作物 / 地方品種",
"400": "育種 / 研究材料",
"410": "育種者育種系",
"411": "合成族群",
"412": "雜交",
"413": "初始庫存/基礎族群",
"414": "近交系",
"415": "隔離族群",
"416": "複製選擇",
"420": "遺傳資源",
"421": "突變體",
"422": "細胞遺傳資源",
"423": "其他遺傳資源",
"500": "高進階改良品種",
"600": "GMO",
"999": "其他"
},
"collectingSource": {
"10": "野生棲地",
"11": "森林或樹林",
"12": "灌木地",
"13": "草原",
"14": "沙漠或苔原",
"15": "水生棲地",
"20": "田地或栽培棲地",
"21": "田地",
"22": "果園",
"23": "後院、廚房或家庭花園(城市、郊區或農村)",
"24": "休耕地",
"25": "牧地",
"26": "農場商店",
"27": "脫穀場",
"28": "公園",
"30": "市場或商店",
"40": "機構,研究站,研究組織,種原庫",
"50": "種子公司",
"60": "雜草、受干擾或荒涼的棲息地",
"61": "道路邊",
"62": "田邊",
"99": "其他"
},
"mlsStatus": {
"true": "品系為 ITPGRFA 多邊系統的一員",
"false": "未公告於ITOGRAFA多邊系統中",
"1": "品系為 ITPGRFA 多邊系統的一員",
"0": "未公告於ITOGRAFA多邊系統中",
"null": "未提供狀態"
},
"available": {
"0": "不可申請",
"1": "可申請配送",
"true": "可申請配送",
"false": "不可申請",
"null": "未提供是否可申請資訊"
},
"sgsv": {
"true": "備份於SGSV",
"false": "未備份於SGSV",
"1": "備份於SGSV",
"0": "未備份於SGSV"
},
"aegisStatus": {
"true": "品系為歐洲收藏的一部分",
"false": "品系非歐洲收藏的一部分",
"1": "品系為歐洲收藏的一部分",
"0": "品系非歐洲收藏的一部分"
}
},
"cart": {
"title": "購物車",
"addToCart": "新增至購物車",
"removeFromCart": "從購物車移除",
"isEmpty": "購物車是空的",
"request": "申請材料"
},
"request": {
"title": "個人資訊",
"submit": "送出申請",
"internalExplanation": "如果您從自己的機構索取材料,請將申請標記為內部申請。",
"successMessage": "已收到您的申請",
"checkEmail": "檢查您的電子郵件(和您的垃圾郵件文件夾)以獲取來自 Genesys 的驗證消息和進一步說明。",
"userData": {
"name": "名字",
"surname": "姓氏",
"email": "E-mail 信箱",
"address": "地址",
"country": "ISO3 國家代碼",
"telephone": "電話",
"orgName": "機構名稱"
},
"requestInfo": {
"email": "您在 Easy-SMTA 中註冊的電子郵件地址",
"notes": "與您的申請一同提交的附註",
"internalRequest": "內部申請(不需要 SMTA)",
"internalExplanation": "如果您從自己的機構申請材料,請將申請標記為內部申請。",
"additionalInfo": "歡迎提供任何其他有關您的申請的訊息",
"internal": "內部申請(不需要 SMTA)",
"preacceptSMTA": {
"label": "SMTA/MTA 接受",
"yes": "我將接受 SMTA/MTA 的條款和條件",
"no": "我不接受 SMTA/MTA 的條款和條件"
},
"purposeType": {
"label": "指定材料用途:",
"0": "其他(請在備註欄詳細說明)",
"1": "食品和農業研究"
}
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment