diff --git a/src/localization/index.ts b/src/localization/index.ts index 9165bd49..95938f73 100644 --- a/src/localization/index.ts +++ b/src/localization/index.ts @@ -6,6 +6,7 @@ export const langNames = { tr: '🇹🇷', ru: '🇷🇺', 'zh-cn': '🇨🇳', + 'zh-tw': '🇹🇼', uk: '🇺🇦', ka: '🇬🇪', ko: '🇰🇷', diff --git a/src/localization/zh-tw/Cheatsheet.json b/src/localization/zh-tw/Cheatsheet.json new file mode 100644 index 00000000..e0d74399 --- /dev/null +++ b/src/localization/zh-tw/Cheatsheet.json @@ -0,0 +1,70 @@ +{ + "cheatsheet.section.title": "正規表示式小抄", + "cheatsheet.section.description": "透過正規表示式小抄探索所有正規表示式配對模式與符號。", + + "cheatsheet.anchors": "錨點", + "cheatsheet.caret.title": "字串或行的開頭", + "cheatsheet.caret.description": "配對字串或是行的開頭。", + "cheatsheet.dollar.title": "字串或行的結尾", + "cheatsheet.dollar.description": "配對字串或是行的結尾。", + "cheatsheet.wordBoundary.title": "文字邊界", + "cheatsheet.wordBoundary.description": "配對文字字元或是文件結尾位置。", + "cheatsheet.notWordBoundary.title": "非文字邊界", + "cheatsheet.notWordBoundary.description": "配對文字字元或位置不在文字結尾。", + + "cheatsheet.characterClasses": "字元類型", + "cheatsheet.characterSet.title": "字元集", + "cheatsheet.characterSet.description": "配對在字元集的字元", + "cheatsheet.negatedCharacterSet.title": "負向表列字元集", + "cheatsheet.negatedCharacterSet.description": "配對任何不在字元集的字元。", + "cheatsheet.range.title": "範圍", + "cheatsheet.range.description": "配對任何在兩個字元間的所有字元,包括本身。", + "cheatsheet.dot.title": "點", + "cheatsheet.dot.description": "配對除了斷行符號的任何字元。", + "cheatsheet.word.title": "文字", + "cheatsheet.word.description": "配對任何字母字元,包括底線。", + "cheatsheet.notWord.title": "非文字", + "cheatsheet.notWord.description": "配對任何非字母字元。", + "cheatsheet.digit.title": "數字", + "cheatsheet.digit.description": "配對任何數字字元。", + "cheatsheet.notDigit.title": "非數字", + "cheatsheet.notDigit.description": "配對任何非數字字元。", + "cheatsheet.space.title": "空白字元", + "cheatsheet.space.description": "配對任何空白字元。", + "cheatsheet.notSpace.title": "非空白字元", + "cheatsheet.notSpace.description": "配對任何非空白字元。", + + "cheatsheet.flags": "標記", + "cheatsheet.caseInsensitiveFlag.title": "忽略大小寫", + "cheatsheet.caseInsensitiveFlag.description": "讓表示式忽略大小寫。", + "cheatsheet.globalFlag.title": "全域", + "cheatsheet.globalFlag.description": "確保表示式不會停在第一次吻合。", + "cheatsheet.multilineFlag.title": "多行", + "cheatsheet.multilineFlag.description": "如果不啟用,行開頭與結尾等於整個字串的開頭與結尾,不會為個別行作用。", + + "cheatsheet.groupAndReferences": "群組與參照", + "cheatsheet.group.title": "群組", + "cheatsheet.group.description": "將表示式群組。", + "cheatsheet.reference.title": "參照", + "cheatsheet.reference.description": "參照已經群組的表示式。", + "cheatsheet.nonCapturingGroup.title": "非補捉群組", + "cheatsheet.nonCapturingGroup.description": "標記群組不能被參照。", + + "cheatsheet.lookarounds": "環顧", + "cheatsheet.positiveLookahead.title": "正向向前選取", + "cheatsheet.negativeLookahead.title": "負向向前選取", + "cheatsheet.positiveLookbehind.title": "正向向後選取", + "cheatsheet.negativeLookbehind.title": "負向向後選取", + + "cheatsheet.quantifiersAndAlternation": "量詞與替代建構", + "cheatsheet.plus.title": "正數", + "cheatsheet.plus.description": "表示式吻合一次或多次。", + "cheatsheet.asterisk.title": "星號", + "cheatsheet.asterisk.description": "表示式吻合0次或多次。", + "cheatsheet.quantifier.title": "量詞", + "cheatsheet.quantifier.description": "表示式吻合特定的範圍。", + "cheatsheet.optional.title": "選擇性的", + "cheatsheet.optional.description": "標記表示式為選擇性的。", + "cheatsheet.alternation.title": "替代建構", + "cheatsheet.alternation.description": "或者這樣可以運作,會等待其中存起來的一個表示式吻合。" +} diff --git a/src/localization/zh-tw/general.json b/src/localization/zh-tw/general.json new file mode 100644 index 00000000..90936240 --- /dev/null +++ b/src/localization/zh-tw/general.json @@ -0,0 +1,39 @@ +{ + "general.prev": "先前", + "general.next": "之後", + "general.result": "結果", + "general.regex": "正規表示式", + "general.text": "文字", + "general.watch": "觀看", + "general.start": "開始", + "general.continue": "繼續", + "general.completedStep": "完成步驟!", + "general.hintQuestion": "顯示解答", + "general.reportStep": "回報問題", + "general.startLearning": "開始課程", + "general.comingSoon": "即將來臨", + "general.becomeSponsor": "成為贊助者", + "general.learn": "學習", + "general.playground": "遊樂場", + "general.cheatsheet": "小抄", + "general.ourSponsors": "我們的贊助者", + "general.share": "分享", + "general.shareLinkCopied": "已經複製分享連結!", + "general.somethingWentWrong": "有東西出錯了!", + + "notFound.intro": "你在找的頁面並不存在。", + "notFound.button": "回到首頁", + + "page.landing.title": "學習正規表示式 - 一步步來,從入門到進階。", + "page.learn.title": "學習正規表示式 - 正規表示式互動課程", + "page.cheatsheet.title": "學習正規表示式 - 正規表示式小抄", + "page.playground.title": "學習正規表示式 - 遊樂場", + "page.404.title": "學習正規表示式 - 找不到", + + "page.landing.description": "互動方式學習正規表示式,以你的程度來學習、測驗與分享你自己的正規表示式。", + "page.learn.description": "一步步學習正規表示式,完成互動學習課程讓你學習過程更容易與更快。", + "page.cheatsheet.description": "有時候你只是需要記下正規表示式的語法,試試小抄讓一切更容易理解與記憶。", + "page.playground.description": "你可以透過線上的遊樂場來更容易建構與測試你的正規表示式模組。", + + "learn.safari.unsupportWarning": "這一步驟的正規表示式有些瀏覽器並不支援,如果你在這一步遇到問題,你可以點這裡。" +} diff --git a/src/localization/zh-tw/index.js b/src/localization/zh-tw/index.js new file mode 100644 index 00000000..a30a668d --- /dev/null +++ b/src/localization/zh-tw/index.js @@ -0,0 +1,17 @@ +import cheatsheet from './cheatsheet.json'; +import general from './general.json'; +import landing from './landing.json'; +import learn from './learn.json'; +import lessons from './lessons.json'; +import regexForSeo from './lessons/regexForSeo.json'; + +const messages = { + ...cheatsheet, + ...general, + ...landing, + ...learn, + ...lessons, + ...regexForSeo, +}; + +export default messages; diff --git a/src/localization/zh-tw/landing.json b/src/localization/zh-tw/landing.json new file mode 100644 index 00000000..f6e268df --- /dev/null +++ b/src/localization/zh-tw/landing.json @@ -0,0 +1,26 @@ +{ + "landing.title": "一步步學習正規表示式,從入門到進階。", + "landing.description": "學習正規表示式比你想像得還要容易,你可以使用這工具來輕鬆`學習`、`練習`、`測驗`與`分享`正規表示式。", + "landing.imageAltText": "一個男士坐姿輕鬆腿放在桌子上的插圖。", + + "section.learn.title": "學習", + "section.learn.content": "`正規表示式`,英文叫 Regex 或是 Regexp,是一組藉由正規表示式語法規則創造,由字元組成的字串。You can easily manage your data with Regex, which uses commands like finding, matching, and editing. Regex can be used in programming languages such as Python, SQL, JavaScript, R, Google Analytics, Google Data Studio, and throughout the coding process. Learn regex online with examples and tutorials on RegexLearn now.", + "section.learn.imageAltText": "山頂有旗幟的插圖。", + + "section.cheatsheet.button": "現在檢視吧!", + "section.cheatsheet.title": "小抄", + "section.cheatsheet.content": "有了`RegexLearn小抄`,你可以直接在一個頁面當中,一次看到所有的用法。透過 Regex 小抄瀏覽所有正規表示式模式與符號。", + "section.cheatsheet.imageAltText": "人透過望遠鏡瀏覽頁面的插圖。", + + "section.playground.title": "遊樂場", + "section.playground.content": "如果你想要產生正規表示式的話,你可以輕易透過遊樂場來測式正規表示式模式。而做為正規表示式測試者,你可以跟其他人合作驗證與分享正規表示式模式。", + "section.playground.imageAltText": "一隻貓即將摔破玻璃杯的插圖。", + + "section.practice.title": "練習", + "section.practice.content": "如果你完成學習課程,如今是練習時間!在練習部分,你可以測試侚的正規表示式知識,以及之後推出,依據你程度練習正規表示式教學的練習題目。", + "section.practice.imageAltText": "一位女士看書記筆記的插圖。", + + "section.opensource.title": "開放原始碼", + "section.opensource.content": "正規表示式學習是開源的專案,因此歡迎各方貢獻R,以及免費使用。貢獻專案將會打摩你的技能、學習與合作。你可以來這邊貢獻與支援。", + "section.opensource.imageAltText": "女士、男士與貓一起組拼圖的插圖。" +} diff --git a/src/localization/zh-tw/learn.json b/src/localization/zh-tw/learn.json new file mode 100644 index 00000000..a686551a --- /dev/null +++ b/src/localization/zh-tw/learn.json @@ -0,0 +1,163 @@ +{ + "examples.starter.title": "練習", + "examples.starter.description": "現在透過練習來強化所學。", + + "examples.finish.title": "完成練習!", + "examples.finish.description": " ", + + "steps.starter.title": "介紹", + "steps.starter.description": "Regex 是`正規表示式`(Regular Expression)的縮寫,能幫助你吻合、尋找與管理文字。先從在正規表示式欄位輸入`OK`開始第一步,並且察看更為詳細的說明。", + + "steps.whatIsRegex.title": "什麼是正規表示式 `Regex`?", + "steps.whatIsRegex.description": "正規表示式是一系列表現搜尋模式的字元組合,通常英文縮寫為 `Regex` 或是 `Regexp`,通常會用來尋找或是取代文字片段當中的字。除此之外,我們也能測試文字是否符合我們設定的規則。\\n\\n例如說,你手上有檔案名稱清單,你只想要找副檔名有 `pdf` 的檔案,只要打上 `^\\w+\\.pdf$` 就可以找出來了。這意味著採用正規表示式會隨著步驟走越來越清楚了。", + + "steps.basicMatchers.title": "基本吻合", + "steps.basicMatchers.description": "我們想要找的字元或是文字已經寫好了,整個過程類似尋找。例如,在段落當中尋找`好奇`,也一樣輸入。", + + "steps.dotCharacter.title": "點 `.`: 任何字元", + "steps.dotCharacter.description": "點 `.` 允許選擇任何字元,包括特殊字元與空白。在正規表示式欄位輸入點 `.`。", + + "steps.characterSet.title": "字元集 `[abc]`", + "steps.characterSet.description": "如果文字當中的其中一個字元是任何字元,我們會在括號 `[]` 內輸入所有不同字元。例如,如果要撰寫表示式找段落當中出現的所有文字,則在括號 `[]` 內彼此相鄰輸入字元 `a`、`e`、`i`、`o`、`u`。", + + "steps.negatedCharacterSet.title": "排除字元集 `[^abc]`", + "steps.negatedCharacterSet.description": "要找尋下列段落所有文字當中,除了 `ber` 與 `bor` 之外的文字,在括號 `[]` 內插入記號 `^` 後彼此相鄰輸入 `e`、`o`。", + + "steps.range.title": "字母範圍`[a-z]`", + "steps.range.description": "要找尋特定範圍內的字母,可以在括號 `[]` 內填寫開始與結束的字母,並且在中間用折線 `-` 連結,這種方式是區分大小寫的。請輸入包括 `e` 與 `o` 則會選擇包括本身兩者之間的小寫字母。", + + "steps.rangeNumber.title": "數字範圍`[0-9]`", + "steps.rangeNumber.description": "要找尋特定範圍內的數字,可以在括號 `[]` 內填寫開始與結束的數字,並且在中間用折線 `-` 連結。請輸入包括 `3` 與 `6`,則會選擇包括本身兩者之間數字。", + + "examples.basicMatchers.title": "練習:基本吻合", + "examples.basicMatchers.description": "撰寫選取段落當中 `of` 文字的表示式。", + + "examples.dotCharacter.title": "練習:任何字元", + "examples.dotCharacter.description": "輸入這一表示式來選擇文字當中的單一字母、數字、空白與特殊符號。表示式能找到任何字元。", + + "examples.characterSet.title": "練習:字元組", + "examples.characterSet.description": "撰寫表示式來吻合段落中的文字,只有開頭的文字要改變。", + + "examples.negatedCharacterSet.title": "練習:排除字元組", + "examples.negatedCharacterSet.description": "撰寫表示式,吻合除了 `beor` 與 `beur` 之外段落當中的文字。請使用排除字元組。", + + "examples.range.title": "練習:字母範圍", + "examples.range.description": "撰寫表示式來選擇段落當中範圍從 `g` 到 `k` 之間的字母。\\n`g` 到 `k` 這兩個字母也必須包括在範圍內。", + + "examples.rangeNumber.title": "練習:數字範圍", + "examples.rangeNumber.description": "撰寫表示式來選擇段落當中範圍從 `2` 到 `7` 之間的數字。\\n`2` 到 `7` 這兩個數字也必須包括在範圍內。", + + "steps.repetitions.title": "重覆", + "steps.repetitions.description": "有些特殊字元用在表示段落當中特定字元重覆次數。這些特殊字元有加號 `+`、星號 `*` 以及問號 `?`。", + + "steps.asterisk.title": "星號 `*`", + "steps.asterisk.description": "我們在字元後面加上星號 `*` 來表示可能沒吻合,或是吻合多次。例如說,指示字母 `e` 沒有出現在文字當中,或是有出現一次或者接連多次出現。", + + "steps.plusCharacter.title": "加號 `+`", + "steps.plusCharacter.description": "我們在字元後面加上加號 `+` 來表示吻合一次或是更多次。例如說,表示字母 `e` 可以在段落中吻合一次或更多次。", + + "steps.questionMark.title": "問號 `?`", + "steps.questionMark.description": "我們在字元後面加上問號 `?`,例如說,表示 `u` 後面的字母是可有可無。", + + "steps.quantifier.title": "大括號 - 1", + "steps.quantifier.description": "我們在結尾加上大括號 `{n}` 來表示我們希望字元吻合的次數。例如說,表示字母 `e` 只能吻合 `2` 次。", + + "steps.quantifierMin.title": "大括號 - 2", + "steps.quantifierMin.description": "要來表示某個字元出現的最少吻合次數,我們在字元後立即寫出我們希望出現的最少次數,後面跟著逗號 `,`,並用大括號 `{n, }` 包起來。例如說,表示以下字母 `e` 最少吻合 `3` 次。", + + "steps.quantifierRange.title": "大括號 - 3", + "steps.quantifierRange.description": "要來表示某個字元的吻合次數範圍,我們寫大括號 `{x,y}` 裡頭寫出開始到結尾的區間。例如說,這表示接續的字母 `e` 只可以吻合`1` 到 `3` 次。", + + "examples.asterisk.title": "練習:星號 `*`", + "examples.asterisk.description": "使用星號 `*` 來撰寫表示式選取每個文字,適合文字當中沒有或是一次或是多次出現字母 `e` 的情形。", + + "examples.plusCharacter.title": "練習:加號 `+`", + "examples.plusCharacter.description": "使用加號 `+` 來撰寫表示式選取文字當中吻合一次或是多次字母 `e` 的情形。", + + "examples.questionMark.title": "練習:問號 `?`", + "examples.questionMark.description": "使用問號 `?` 撰寫表示式表達文字當中字母 `n` 是選擇性的。因此 `a` 與 `an` 都會被選擇。", + + "examples.quantifier.title": "練習:大括號 - 1", + "examples.quantifier.description": "使用大括號 `{}` 來找文字當中含有連續的 `4` 數字。記住範圍 `[0-9]` 會找出吻合的單一位數字。", + + "examples.quantifierMin.title": "練習:大括號 - 2", + "examples.quantifierMin.description": "使用大括號 `{}` 來找出文字當中連續出現至少 `2` 的文字。", + + "examples.quantifierRange.title": "練習:大括號 - 3", + "examples.quantifierRange.description": "使用大括號 `{}` 找出文字當中連續出現現至少 `1` 以及最多 `4` 的文字。", + + "steps.groupping.title": "Parentheses `( )`: 群組", + "steps.groupping.description": "我可以群組表示式,並且採用群組來參照或是套用一些規則。要群組表示式,則需要在 `()` 括號內。現在我自來群組下面的 `haa`。", + + "steps.groupReference.title": "參照群組", + "steps.groupReference.description": "`ha` 與 `haa` 已經在下面群組了。第一個群組用 `\\1` 來撰寫避免再重寫。這邊 `1` 表示群組的順序。在表示式結尾輸入 `\\2` 表示第二個群組。", + + "steps.nonCapturingGroupping.title": "圓括號 `(?: )`: 非捕捉群組", + "steps.nonCapturingGroupping.description": "你可以指定群組的表達式是非參照捕捉群組。例如下列的兩組群組。然後,第一個群組參照用 `\\1` 修飾實際是表示第二個群組,因為第一個群組是非博捉群組。", + + "steps.pipeCharacter.title": "管道字元 `|`", + "steps.pipeCharacter.description": "這個選項允許表示式有不同的表示式。因此,所有可能的聲稱用管道符號 `|` 分隔。這個選項與 `[abc]` 字元組是以字元為層次運作,其他的是以表示式的層次。例如,下列的表示式會同時選擇 `cat` 與 `rat`。新增其他管道符號 `|` 在表示式結尾再打上 `dog` 則會所有文字都會被選到。", + + "steps.escapeCharacter.title": "逃脫字元 `\\`", + "steps.escapeCharacter.description": "當撰寫表示式時使用一些特殊字元, `{ } [ ] / \\ + * . $^ | ?` 。當然我們也可以選擇這些字元,但我們需要用跳脫字元 `\\`。例如,選擇文字當中的句號 `.` 和星號 `*` 字元,就能在前面加上逃脫字元 `\\`。", + + "steps.caret.title": "插入記號 `^`:\\n在一行開始處選擇", + "steps.caret.description": "我們使用 `[0-9]` 來找數字,要只在一行的開頭找數字的話,請在前面加上前綴 `^` 符號。", + + "steps.dollar.title": "金錢符號 `$`:\\n在一行結束處選擇", + "steps.dollar.description": "Let's use the `$` sign after the `html` value to find the `html` texts only at the end of the line.", + + "steps.wordCharacter.title": "文字字元 `\\w`: 字母、數字與底線", + "steps.wordCharacter.description": "表示式 `\\w` 是用來找字母、數字與底線字元。讓我們使用表示式 `\\w` 來找文字當中的文字字元。", + + "steps.withoutWordCharacter.title": "排除文字字元 `\\W`", + "steps.withoutWordCharacter.description": "表示式 `\\W` 是用來排除字母、數字與底線的字元。", + + "steps.numberCharacter.title": "數字字元 `\\d`", + "steps.numberCharacter.description": "`\\d` 是只用來找數字字元", + + "steps.withoutNumberCharacter.title": "排除數字字元 `\\D`", + "steps.withoutNumberCharacter.description": "`\\D` 是用來排除數字字元。", + + "steps.spaceCharacter.title": "空白字元 `\\s`", + "steps.spaceCharacter.description": "`\\s` 是只用來找空白字元。", + + "steps.withoutSpaceCharacter.title": "排除空白字元 `\\S`", + "steps.withoutSpaceCharacter.description": "`\\S` 是用來排除空白字元。", + + "steps.lookarounds.title": "環顧", + "steps.lookarounds.description": "如果你想要某個詞出現在某個詞之前或是之後的話,我們需要 \"環顧\"。接著來學習如何 \"環顧\".", + + "steps.positiveLookahead.title": "正面向前環顧: `(?=)`", + "steps.positiveLookahead.description": "例如,我們希望選取文字當中的時間數值,因此我們只要選取在後面有接 `PM` 的數字,我們需要在表示式後接上正面向前環顧表示式 `(?=)`,包括括號內 `=` 符號後接續 `PM`。", + + "steps.negativeLookahead.title": "負面向前環顧: `(?!)`", + "steps.negativeLookahead.description": "例如,我們希望選取文字當中數字而非時間,因此我們在表示式後撰寫負面向前環顧 `(?!)` 表示式,就只會選取數字,而非後面接有 `PM`。包括括號內 `!` 符號後接續 `PM`。", + + "steps.positiveLookbehind.title": "正面向後環顧: `(?<=)`", + "steps.positiveLookbehind.description": "For example, we want to select the price value in the text. Therefore, to select only the number values that are preceded by `$`, we need to write the positive lookbehind expression `(?<=)` before our expression. Add `\\$` after the `=` sign inside the parenthesis.", + + "steps.negativeLookbehind.title": "負面向後環顧: `(?<!)`", + "steps.negativeLookbehind.description": "例如,我們想要選取文字當中的數字但非價格,因此我們不選取 `$` 後有數字的數字,我們需要在表示式前撰寫負面向後環顧 `(?<!)`。在括號內 `!` 後新增表示 `\\$`。", + + "steps.flags.title": "修飾詞", + "steps.flags.description": "修飾詞改變表示式的輸出,這也是為什麼又稱為`旗旘`。修飾詞能夠決定表示式處理文字的方式,像是分行、是否大小寫敏感,或是尋找所有吻合狀態。接下來的課程會詳細解釋修飾詞運作方式。", + + "steps.flagsGlobal.title": "全域修飾詞", + "steps.flagsGlobal.description": "`全域`修飾詞造成表示式會找出所有吻合結果。如果不啟用則只會顯示第一筆吻合結果。如果啟用`全域`修飾詞則會選取所有吻合結果。", + + "steps.flagsMultiline.title": "多行修飾詞", + "steps.flagsMultiline.description": "正規表示式會視所有文字為一行,但當我們使用`多行`修飾詞時表示一行一行來處理資料。這種方式之下,我們撰寫表示式來區別每一行行末不同模式。如果啟用`多行`模式則會找出所有吻合結果。", + + "steps.flagsCaseInsensitive.title": "不區分大小寫修飾詞", + "steps.flagsCaseInsensitive.description": "為了要移除表示式的區分大小寫的設定,我們需要啟用`不區別大小寫`的修飾詞。", + + "steps.greedyMatching.title": "貪心比對", + "steps.greedyMatching.description": "正規表示式預設是啟用貪心模式來比對,這意味著吻合時會盡可能越長越好。檢視以下範圍,意思是任何結尾是 `r` ,而且前面是任何字元的吻合結果,但不會只停在第一個字母 `r`。", + + "steps.lazyMatching.title": "偷懶比對", + "steps.lazyMatching.description": "偷懶比對,不像貪心比對那樣,會在第一次吻合時就停止了。例如說,以下的例子來說,在 `*` 新增 `?` 則會在吻合字前面有任何字母,字結尾有 `r` 時,吻合一次就會停止,意味著吻合到第一個 `r` 字母。", + + "steps.completeAllSteps.title": "恭喜你,你已經完成所有課程了!", + "steps.completeAllSteps.description": "你可以在任何時候回到先前的步驟,而且可以瀏覽先前通過的步驟。" +} diff --git a/src/localization/zh-tw/lessons.json b/src/localization/zh-tw/lessons.json new file mode 100644 index 00000000..c0912c99 --- /dev/null +++ b/src/localization/zh-tw/lessons.json @@ -0,0 +1,7 @@ +{ + "lessons.regex101.title": "Regex 101 - ZH-TW", + "lessons.regex101.description": "你可以在本次教學學習基礎的正規表示式知識。", + + "lessons.regexForSeo.title": "Regex for SEO - ZH-TW", + "lessons.regexForSeo.description": "在這次課程中,你可以學習與應用正規表示式在 SEO 的用途。" +} diff --git a/src/localization/zh-tw/lessons/regexForSeo.json b/src/localization/zh-tw/lessons/regexForSeo.json new file mode 100644 index 00000000..c98e2518 --- /dev/null +++ b/src/localization/zh-tw/lessons/regexForSeo.json @@ -0,0 +1,49 @@ +{ + "lesson.regexForSeo.starter.title": "SEO 當中的正規表示式", + "lesson.regexForSeo.starter.description": "Regex 是一組各領域常用的正規表示式,特別是想增進他們生產力的人們。使用正規表示式在 SEO 的好處是更容易分析巨量資料以及撰寫更豐富的篩選規則。我們建議你如果是新手則從 `正規表示式 101` 教學開始。 \\n\n從 Regex 欄位打 `OK` 開始第一課,然後閱讀更詳細的解釋。", + + "lesson.regexForSeo.usage.title": "使用情境", + "lesson.regexForSeo.usage.description": "你在 SEO 的正規表示式應用到平台上,例如 `Google Analytics`、`Ahrefs`、`Deepcrawl`、`Screaming Frog`。而且也會常用在 `.htaccess` 與 `robots.txt` (類似正規表示式語法) 檔案當中。\\n\n以下是一些簡單的正規表示式範例,能夠選取 `Google` 開頭的文字。", + + "lesson.regexForSeo.basics.title": "基本", + "lesson.regexForSeo.basics.description": "我們從一些常用的正規表示式例子講起,我們推薦你再次閱讀 `正規表示式 101` 教學來學習更多資訊。按 `是` 來開始。", + + "lesson.regexForSeo.or.title": "或是運算子 `|`", + "lesson.regexForSeo.or.description": "我們使用或運算子 `|` 來篩選出多重表示式。例如我們想要篩選文字包含 `seo` 與 `regex` 兩個字,就用或是運算子 `|` 來分隔。", + + "lesson.regexForSeo.optional.title": "選擇性的運算子 `?`", + "lesson.regexForSeo.optional.description": "我們使用來表示表示式或是字元是選擇性的。例如我們想篩選出有 `http` 與 `https` 兩者都要。我們可以使用或是運算子 `|` 來處理,但是比較好的方式是這兩都很像。\\n\n在這一例子當中,字母 `s` 是選擇性的,因此能加上問號 `?` 來替代結尾的字母 `s`。", + + "lesson.regexForSeo.any.title": "任何 `.*`", + "lesson.regexForSeo.any.description": "在正規表示式當中,逗號 `,` 能吻合任何字元,包括空白。但是使用時這只會吻合一個字元。因此加星號 `*` 表示文字當中後面沒有字元或是有超過一個字元的情形。當兩者組合在一起使用時,表示任何長度的元素。\\n\n以下有多個關鍵字,在正規表示式結尾新增 `.*` 來表示開頭為 `how to write` 以及吻合後面任何東西。", + + "lesson.regexForSeo.contains.title": "包含", + "lesson.regexForSeo.contains.description": "要篩選出特定的文字或是片語,我們可以尋找被夾在中間的文字 `.*`。例如我們輸入 `.*buy.*` 來尋找含有 `buy` 的文字。.", + + "lesson.regexForSeo.negated.title": "負面字元集 `[^abc]`", + "lesson.regexForSeo.negated.description": "我們使用負面字元集 `[^]`,中括號開頭用插入符號來排除我們不要的字元。像是 `http` 與 `https`,都包含 `http`,因此也會選擇 `https`。在字母 `p` 之後輸入 `[^s]` 來排除字母 `s`。", + + "lesson.regexForSeo.caret.title": "插入符號 `^`", + "lesson.regexForSeo.caret.description": "我們有網址清單,而我們只想要找 `http` 開頭的網址,但有時候 `http` 也會出現在不是開頭的地方。所以在開頭新增插入符號 `^` 能夠只篩選出 `http` 開頭的網址。", + + "lesson.regexForSeo.dollarAndEscape.title": "錢幣符號 `$` 與跳脫字元 `\\`", + "lesson.regexForSeo.dollarAndEscape.description": "我們又有網址清單,我們只想要網址結尾是 `.htm`。\\n\\n由於句號是特殊字元會吻合所有,我們需要用跳脫字元 `\\` 把 `htm` 前的使其失效。這會套用到所有特殊字元。\\n\\n接著在表示式結尾加上 `$`,這會確保篩選出來的文字結尾部分前面是吻合表示式的。", + + "lesson.regexForSeo.limitation.title": "長度限制 `{n}`", + "lesson.regexForSeo.limitation.description": "我們也許會希望依據字元長度篩選出結果。例如我們要篩選出 `35` 字元長度的網址,因此你會輸入長度 `{35}`,用中括號包起來並且結尾加上句號 `.`。", + + "lesson.regexForSeo.maxLimitation.title": "長度限制 (最大) `{n,m}`", + "lesson.regexForSeo.maxLimitation.description": "要篩選大長度 `35` 字元,輸入 `{1,35}` 的最小與最大數值,然後使用大括號包起來,最後在結眉加上句號。", + + "lesson.regexForSeo.minLimitation.title": "長度限制 (最小) `{n,}`", + "lesson.regexForSeo.minLimitation.description": "要篩選最短長度 `35` 字元的網址,輸入 `{35,}` 然後在句點結尾加大括號,然後輸入我們要找的最小數值接著加逗號。", + + "lesson.regexForSeo.robots.title": "robots.txt (類似正規表示式語法)", + "lesson.regexForSeo.robots.description": "這邊是 `robots.txt` 檔案當中類似正規表示式的例子,例子當中註明不要爬取 `pdf` 結尾的附檔名。", + + "lesson.regexForSeo.htaccess.title": ".htaccess", + "lesson.regexForSeo.htaccess.description": "這是 `.htaccess` 檔案當中類似正規表示式的例子,例子當中 `php` 的副檔名結尾會重新導向至 `html` 副檔名並且顯示 `301` 代碼。", + + "lesson.regexForSeo.outro.title": "其他", + "lesson.regexForSeo.outro.description": "正規表示式知識是在任何平台增進你生產力的技能。一旦你學會使用之後,並且持續精進技能,你能夠更快完成重覆性工作,將時間用其他事務。要更瞭解正規表示式的基礎知識,你可以瀏覽 `Regex 101` 教學,你可以進入`遊樂場`頁面來測試你的表示式套用到文字的狀況。" +}