Skip to content

Commit

Permalink
chore: add initial patches
Browse files Browse the repository at this point in the history
  • Loading branch information
lacolaco committed Jul 11, 2024
1 parent f4f4848 commit 04e2942
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 4 deletions.
11 changes: 11 additions & 0 deletions tools/adev-patches/change-analytics-id.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
diff --git a/adev/src/app/environment.ts b/adev/src/app/environment.ts
index 30f0d78db3..c6c18b5183 100644
--- a/adev/src/app/environment.ts
+++ b/adev/src/app/environment.ts
@@ -15,5 +15,5 @@ export default {
apiKey: 'dfca7ed184db27927a512e5c6668b968',
indexName: 'angular_v17',
},
- googleAnalyticsId: 'G-XB6NEVW32B',
+ googleAnalyticsId: 'G-ZE76R447BW',
};
79 changes: 79 additions & 0 deletions tools/adev-patches/change-document-title.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
diff --git a/adev/src/app/core/services/a-dev-title-strategy.ts b/adev/src/app/core/services/a-dev-title-strategy.ts
index 75a1daa0e9..6acf3ec62f 100644
--- a/adev/src/app/core/services/a-dev-title-strategy.ts
+++ b/adev/src/app/core/services/a-dev-title-strategy.ts
@@ -13,7 +13,7 @@ import {ActivatedRouteSnapshot, RouterStateSnapshot, TitleStrategy} from '@angul

export const ROUTE_TITLE_PROPERTY = 'label';
export const ROUTE_PARENT_PROPERTY = 'parent';
-export const TITLE_SUFFIX = 'Angular';
+export const TITLE_SUFFIX = 'Angular 日本語版';
export const TITLE_SEPARATOR = ' • ';
export const DEFAULT_PAGE_TITLE = 'Overview';

diff --git a/adev/src/index.html b/adev/src/index.html
index f6d4c0eb48..292608d443 100644
--- a/adev/src/index.html
+++ b/adev/src/index.html
@@ -1,6 +1,6 @@
<!doctype html>
<!-- We set all theme classes to allow critters to inline the theme styles and prevent flickering -->
-<html lang="en" class="docs-dark-mode docs-light-mode">
+<html lang="ja" class="docs-dark-mode docs-light-mode">
<head>
<script>
// This logic must execute early, so that we set the necessary
@@ -42,13 +42,13 @@
</style>

<meta charset="utf-8" />
- <title>Angular</title>
+ <title>Angular 日本語版</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />

<!-- Primary Meta Tags -->
- <meta name="title" content="Angular" />
- <meta name="description" content="The web development framework for building modern apps." />
+ <meta name="title" content="Angular 日本語版" />
+ <meta name="description" content="モダンなアプリを構築するためのウェブ開発フレームワーク" />

<!-- Favicons -->
<link rel="apple-touch-icon" sizes="180x180" href="/assets/icons/apple-touch-icon.png" />
@@ -58,7 +58,7 @@
<link rel="manifest" href="/assets/icons/site.webmanifest" />
<link rel="mask-icon" href="/assets/icons/safari-pinned-tab.svg" color="#e90464" />
<link rel="shortcut icon" href="/assets/icons/favicon.ico" />
- <link rel="canonical" href="https://angular.dev">
+ <link rel="canonical" href="https://angular.jp">

<meta name="apple-mobile-web-app-title" content="Angular" />
<meta name="application-name" content="Angular" />
@@ -68,21 +68,21 @@

<!-- Open Graph / Facebook -->
<meta property="og:type" content="website" />
- <meta property="og:url" content="https://angular.dev/" />
- <meta property="og:title" content="Angular" />
+ <meta property="og:url" content="https://angular.jp/" />
+ <meta property="og:title" content="Angular 日本語版" />
<meta
property="og:description"
- content="The web development framework for building modern apps."
+ content="モダンなアプリを構築するためのウェブ開発フレームワーク"
/>
<meta property="og:image" content="https://angular.dev/assets/images/ng-image.jpg" />

<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image" />
- <meta property="twitter:url" content="https://angular.dev/" />
- <meta property="twitter:title" content="Angular" />
+ <meta property="twitter:url" content="https://angular.jp/" />
+ <meta property="twitter:title" content="Angular 日本語版" />
<meta
property="twitter:description"
- content="The web development framework for building modern apps."
+ content="モダンなアプリを構築するためのウェブ開発フレームワーク"
/>
<meta property="twitter:image" content="https://angular.dev/assets/images/ng-image.jpg" />

6 changes: 3 additions & 3 deletions tools/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ try {
console.log(chalk.green('==== setup ===='));
await setup();
console.log(chalk.green('==== preBuild ===='));
// await preBuild();
await preBuild();
console.log(chalk.green('==== build ===='));
await build();
console.log(chalk.green('==== postBuild ===='));
Expand All @@ -32,8 +32,8 @@ async function setup() {

async function preBuild() {
// copy translated files
console.log(chalk.cyan('Copy localized files...'));
await copyLocalizedFiles();
// console.log(chalk.cyan('Copy localized files...'));
// await copyLocalizedFiles();

// apply patches
console.log(chalk.cyan('Apply patches...'));
Expand Down
2 changes: 1 addition & 1 deletion tools/lib/common.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export async function watchLocalizedFiles(signal) {
export async function applyPatches() {
await within(async () => {
cd(outDir);
const patches = await glob('tools/git-patch/*.patch', { cwd: rootDir });
const patches = await glob('tools/adev-patches/*.patch', { cwd: rootDir });
for (const patch of patches) {
const path = resolve(rootDir, patch);
await $`git apply -p1 --ignore-whitespace ${path}`;
Expand Down

0 comments on commit 04e2942

Please sign in to comment.