多维表格
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
10 KiB

"use strict";(self.webpackChunknoco_docs=self.webpackChunknoco_docs||[]).push([[1949],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>g});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=a.createContext({}),c=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=c(n),m=r,g=p["".concat(s,".").concat(m)]||p[m]||d[m]||i;return n?a.createElement(g,o(o({ref:t},u),{},{components:n})):a.createElement(g,o({ref:t},u))}));function g(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=m;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:r,o[1]=l;for(var c=2;c<i;c++)o[c]=n[c];return a.createElement.apply(null,o)}return a.createElement.apply(null,n)}m.displayName="MDXCreateElement"},93124:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var a=n(87462),r=(n(67294),n(3905));const i={title:"i18n translation",description:"Contribute to NocoDB's i18n translation"},o=void 0,l={unversionedId:"engineering/translation",id:"version-0.109.7/engineering/translation",title:"i18n translation",description:"Contribute to NocoDB's i18n translation",source:"@site/versioned_docs/version-0.109.7/050.engineering/070.translation.md",sourceDirName:"050.engineering",slug:"/engineering/translation",permalink:"/0.109.7/engineering/translation",draft:!1,editUrl:"https://github.com/nocodb/nocodb/tree/develop/packages/noco-docs/docs/versioned_docs/version-0.109.7/050.engineering/070.translation.md",tags:[],version:"0.109.7",sidebarPosition:70,frontMatter:{title:"i18n translation",description:"Contribute to NocoDB's i18n translation"},sidebar:"tutorialSidebar",previous:{title:"Releases & Builds",permalink:"/0.109.7/engineering/builds-and-releases"},next:{title:"FAQs",permalink:"/0.109.7/FAQs"}},s={},c=[{value:"How to add / edit translations ?",id:"how-to-add--edit-translations-",level:2},{value:"Using Github",id:"using-github",level:3},{value:"Using Crowdin",id:"using-crowdin",level:3},{value:"Reference",id:"reference",level:4},{value:"How to add a new language ?",id:"how-to-add-a-new-language-",level:2},{value:"GitHub changes",id:"github-changes",level:4},{value:"Crowdin changes admin only",id:"crowdin-changes-admin-only",level:4},{value:"String Categories",id:"string-categories",level:2}],u={toc:c},p="wrapper";function d(e){let{components:t,...n}=e;return(0,r.kt)(p,(0,a.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"NocoDB supports 30+ foreign languages & community contributions are now simplified via ",(0,r.kt)("a",{parentName:"li",href:"https://crowdin.com/"},"Crowdin"),".")),(0,r.kt)("h2",{id:"how-to-add--edit-translations-"},"How to add / edit translations ?"),(0,r.kt)("h3",{id:"using-github"},"Using Github"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"For English, make changes directly to ",(0,r.kt)("a",{parentName:"li",href:"https://github.com/nocodb/nocodb/blob/develop/packages/nc-gui/lang/en.json"},"en.json")," & commit to ",(0,r.kt)("inlineCode",{parentName:"li"},"develop")),(0,r.kt)("li",{parentName:"ul"},"For any other language, use ",(0,r.kt)("inlineCode",{parentName:"li"},"crowdin")," option.")),(0,r.kt)("h3",{id:"using-crowdin"},"Using Crowdin"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Setup ",(0,r.kt)("a",{parentName:"li",href:"https://crowdin.com"},"Crowdin")," account"),(0,r.kt)("li",{parentName:"ul"},"Join ",(0,r.kt)("a",{parentName:"li",href:"https://crowdin.com/project/nocodb"},"NocoDB")," project")),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://user-images.githubusercontent.com/86527202/189181511-51b8671e-bee8-45d5-8216-a4a031bc6309.png",alt:"Screenshot 2022-09-08 at 10 26 23 PM"})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Click the language that you wish to contribute")),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://user-images.githubusercontent.com/86527202/189182132-0eed7d5a-eaa1-43e1-929d-688f375763c1.png",alt:"Screenshot 2022-09-08 at 10 29 56 PM"})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Click the ",(0,r.kt)("inlineCode",{parentName:"li"},"Translate")," button; this opens up ",(0,r.kt)("inlineCode",{parentName:"li"},"Crowdin Online Editor"))),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://user-images.githubusercontent.com/86527202/189182450-999124e8-566c-40af-9d3c-731a11c1b6aa.png",alt:"Screenshot 2022-09-08 at 10 32 17 PM"})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Select string in ",(0,r.kt)("inlineCode",{parentName:"li"},"English")," on the left-hand menu bar ","[1]"),(0,r.kt)("li",{parentName:"ul"},"Propose changes ","[2]"),(0,r.kt)("li",{parentName:"ul"},"Save ","[3]","\nNote: Crowdin provides translation recommendation's as in ","[4]",". Click directly if it's apt\n")),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://user-images.githubusercontent.com/86527202/189184278-69d688ed-4e5a-4d5a-b629-9f6d10d79346.png",alt:"Screenshot 2022-09-08 at 10 37 38 PM"})),(0,r.kt)("p",null,"A GitHub Pull Request will be automatically triggered (periodicity- 6 hours). We will follow up on remaining integration work items."),(0,r.kt)("h4",{id:"reference"},"Reference"),(0,r.kt)("p",null,"Refer following articles to get additional details about Crowdin Portal usage"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://support.crowdin.com/crowdin-intro/"},"Translator Introduction")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://support.crowdin.com/for-volunteer-translators/"},"Volunteer Translation Introduction")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://support.crowdin.com/online-editor/"},"Online Editor")," ")),(0,r.kt)("h2",{id:"how-to-add-a-new-language-"},"How to add a new language ?"),(0,r.kt)("h4",{id:"github-changes"},"GitHub changes"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Update enumeration in ",(0,r.kt)("inlineCode",{parentName:"li"},"enums.ts")," ","[packages/nc-gui/lib/enums.ts]"),(0,r.kt)("li",{parentName:"ul"},"Map JSON path in ",(0,r.kt)("inlineCode",{parentName:"li"},"a.i18n.ts")," ","[packages/nc-gui/plugins/a.i18n.ts]")),(0,r.kt)("h4",{id:"crowdin-changes-admin-only"},"Crowdin changes ","[admin only]"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Open ",(0,r.kt)("inlineCode",{parentName:"li"},"NocoDB")," project"),(0,r.kt)("li",{parentName:"ul"},"Click on ",(0,r.kt)("inlineCode",{parentName:"li"},"Language")," on the home tab"),(0,r.kt)("li",{parentName:"ul"},"Select target language, ",(0,r.kt)("inlineCode",{parentName:"li"},"Update")),(0,r.kt)("li",{parentName:"ul"},"Update array in ",(0,r.kt)("inlineCode",{parentName:"li"},"tests/playwright/tests/language.spec.ts")," ")),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://user-images.githubusercontent.com/86527202/189186570-5c1c7cad-6d3f-4937-ab4d-fa7ebe022cb1.png",alt:"Screenshot 2022-09-08 at 10 52 59 PM"})),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://user-images.githubusercontent.com/86527202/189186632-0b9f5f55-0550-4d8f-a8ae-7e9b9076774e.png",alt:"Screenshot 2022-09-08 at 10 54 04 PM"})),(0,r.kt)("h2",{id:"string-categories"},"String Categories"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"General"),": simple & common tokens (save, cancel, submit, open, close, home, and such)"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Objects"),": objects from NocoDB POV (project, table, field, column, view, page, and such)"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Title"),": screen headers (compact) (menu headers, modal headers)"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Lables"),": text box/ radio/ field headers (few words) (Labels over textbox, radio buttons, and such)"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Activity"),"/ actions: work items (few words) (Create Project, Delete Table, Add Row, and such)"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Tooltip"),": additional information associated with work items (usually lengthy) (Additional information provided for activity)"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Placeholder"),": placeholders associated with various textboxes (Text placeholders)"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"Msg"),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Info: general/success category for everything"),(0,r.kt)("li",{parentName:"ul"},"Error: warnings & errors"),(0,r.kt)("li",{parentName:"ul"},"Toast: pop-up toast messages")))),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"Note: string name should be in camelCase. Use above list as priority order in case of ambiguity.")))}d.isMDXComponent=!0}}]);