diff --git a/tools/adev-patches/translate-2024-survey-banner.patch b/tools/adev-patches/translate-2024-survey-banner.patch new file mode 100644 index 0000000000..02324b6a1d --- /dev/null +++ b/tools/adev-patches/translate-2024-survey-banner.patch @@ -0,0 +1,12 @@ +diff --git a/adev/src/app/app.component.html b/adev/src/app/app.component.html +index 5fb1d688a3..09ceae9ae9 100644 +--- a/adev/src/app/app.component.html ++++ b/adev/src/app/app.component.html +@@ -1,6 +1,6 @@ + @defer (when isBrowser) { + +- ++ + } + + diff --git a/tools/git-patch/add-japanese-search.patch b/tools/git-patch/add-japanese-search.patch deleted file mode 100644 index 1b85250c47..0000000000 --- a/tools/git-patch/add-japanese-search.patch +++ /dev/null @@ -1,78 +0,0 @@ -diff --git a/aio/src/app/search/search.worker.ts b/aio/src/app/search/search.worker.ts -index f1c44bc30b..131f976a08 100644 ---- a/aio/src/app/search/search.worker.ts -+++ b/aio/src/app/search/search.worker.ts -@@ -1,6 +1,11 @@ - /// - import * as lunr from 'lunr'; - -+declare const require: any; -+require('lunr-languages/lunr.stemmer.support.js')(lunr); -+require('lunr-languages/tinyseg.js')(lunr); -+require('lunr-languages/lunr.ja.js')(lunr); -+require('lunr-languages/lunr.multi.js')(lunr); - import {WebWorkerMessage} from '../shared/web-worker-message'; - - const SEARCH_TERMS_URL = '/generated/docs/app/search-data.json'; -@@ -45,6 +50,7 @@ function createIndex(loadIndexFn: IndexLoader): lunr.Index { - const queryLexer = (lunr as any as {QueryLexer: {termSeparator: RegExp}}).QueryLexer; - queryLexer.termSeparator = lunr.tokenizer.separator = /\s+/; - return lunr(function() { -+ this.use((lunr as any).multiLanguage('en', 'ja')); - this.pipeline.remove(lunr.stemmer); - this.ref('path'); - this.field('topics', {boost: 15}); -diff --git a/aio/tools/transforms/angular-base-package/processors/generateKeywords.js b/aio/tools/transforms/angular-base-package/processors/generateKeywords.js -index cc43bc7190..c293046a13 100644 ---- a/aio/tools/transforms/angular-base-package/processors/generateKeywords.js -+++ b/aio/tools/transforms/angular-base-package/processors/generateKeywords.js -@@ -128,11 +128,11 @@ module.exports = function generateKeywordsProcessor(log) { - token = token.trim(); - - // Trim unwanted trivia characters from the start and end of the token -- const TRIVIA_CHARS = '[\\s_"\'`({[<$*)}\\]>.,-]'; -+ const TRIVIA_CHARS = '[\\s_"\'`({[<$*)}\\]>.,、。-]'; - // Tokens can contain letters, numbers, underscore, dot or hyphen but not at the start or end. - // The leading TRIVIA_CHARS will capture any leading `.`, '-`' or `_` so we don't have to avoid them in this regular expression. - // But we do need to ensure we don't capture the at the end of the token. -- const POSSIBLE_TOKEN = '[a-z0-9_.-]*[a-z0-9]'; -+ const POSSIBLE_TOKEN = '([a-z0-9_.-]*[a-z0-9]|[^\x00-\x7F]+)'; - token = token.replace(new RegExp(`^${TRIVIA_CHARS}*(${POSSIBLE_TOKEN})${TRIVIA_CHARS}*$`, 'i'), '$1'); - - // Skip if blank or in the ignored words list -diff --git a/aio/package.json b/aio/package.json -index 7fdc4d6de6..56615939ed 100644 ---- a/aio/package.json -+++ b/aio/package.json -@@ -141,2 +140,3 @@ - "lodash": "^4.17.21", -+ "lunr-languages": "1.10.0", - "lunr": "^2.3.9", -diff --git a/aio/yarn.lock b/aio/yarn.lock -index 2e5e277227..f51db2eb3a 100644 ---- a/aio/yarn.lock -+++ b/aio/yarn.lock -@@ -10881,6 +10881,11 @@ lunr@^2.3.9: - resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" - integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== - -+lunr-languages@1.10.0: -+ version "1.10.0" -+ resolved "https://registry.yarnpkg.com/lunr-languages/-/lunr-languages-1.10.0.tgz#2afe9fff47b435d9bc74bd372fb923dbf8ee1990" -+ integrity sha512-BBjKKcwrieJlzwwc9M5H/MRXGJ2qyOSDx/NXYiwkuKjiLOOoouh0WsDzeqcLoUWcX31y7i8sb8IgsZKObdUCkw== -+ - magic-string@0.30.5: - version "0.30.5" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.5.tgz#1994d980bd1c8835dc6e78db7cbd4ae4f24746f9" -diff --git a/aio/BUILD.bazel b/aio/BUILD.bazel -index d67502afae..32972bf625 100644 ---- a/aio/BUILD.bazel -+++ b/aio/BUILD.bazel -@@ -168,6 +168,7 @@ APPLICATION_DEPS = [ - "@aio_npm//@types/lunr", - "@aio_npm//@types/trusted-types", - "@aio_npm//lunr", -+ "@aio_npm//lunr-languages", - "@aio_npm//rxjs", - "@aio_npm//safevalues", - "@aio_npm//tslib", diff --git a/tools/git-patch/add-translated-icon.patch b/tools/git-patch/add-translated-icon.patch deleted file mode 100644 index 24e096861f..0000000000 --- a/tools/git-patch/add-translated-icon.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/aio/src/app/layout/nav-item/nav-item.component.html b/aio/src/app/layout/nav-item/nav-item.component.html -index 0ec330e0b8..6aa94506cb 100644 ---- a/aio/src/app/layout/nav-item/nav-item.component.html -+++ b/aio/src/app/layout/nav-item/nav-item.component.html -@@ -2,6 +2,7 @@ - - {{node.title}} -+
🇯🇵
-
- - -diff --git a/aio/src/app/navigation/navigation.model.ts b/aio/src/app/navigation/navigation.model.ts -index 1d832de471..7ecc78caa5 100644 ---- a/aio/src/app/navigation/navigation.model.ts -+++ b/aio/src/app/navigation/navigation.model.ts -@@ -13,6 +13,7 @@ export interface NavigationNode { - tooltip?: string; - hidden?: boolean; - children?: NavigationNode[]; -+ translated?: boolean; - } - - export type NavigationResponse = {__versionInfo: VersionInfo } & { [name: string]: NavigationNode[]|VersionInfo }; diff --git a/tools/git-patch/localize-error-template.patch b/tools/git-patch/localize-error-template.patch deleted file mode 100644 index e173080654..0000000000 --- a/tools/git-patch/localize-error-template.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/aio/tools/transforms/templates/error/error.template.html b/aio/tools/transforms/templates/error/error.template.html -index 29fc85edd2..accc3619c7 100644 ---- a/aio/tools/transforms/templates/error/error.template.html -+++ b/aio/tools/transforms/templates/error/error.template.html -@@ -20,7 +20,7 @@ - {% if doc.videoCaption %}{$ doc.videoCaption | marked $}{% endif%} - -
--

Description

-+

説明

- {$ doc.description | marked $} -
- -@@ -29,7 +29,7 @@ -
- -
--

Debugging the error

-+

エラーのデバッグ

- {$ doc.debugging | marked $} -
- {% endif%}