Skip to content

Commit 3e47877

Browse files
Merge pull request #7 from AppOutlet/portuguese-translation
Portuguese translation
2 parents e8188e4 + 246b2a5 commit 3e47877

10 files changed

Lines changed: 248 additions & 5 deletions

File tree

angular.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"options": {
2020
"browser": "src/main.ts",
2121
"polyfills": [
22-
"zone.js"
22+
"zone.js",
23+
"@angular/localize/init"
2324
],
2425
"tsConfig": "tsconfig.app.json",
2526
"inlineStyleLanguage": "scss",
@@ -92,9 +93,23 @@
9293
],
9394
"styles": [
9495
"src/styles.scss"
96+
],
97+
"polyfills": [
98+
"@angular/localize/init"
9599
]
96100
}
97101
}
102+
},
103+
"i18n": {
104+
"sourceLocale": {
105+
"code": "en",
106+
"subPath": ""
107+
},
108+
"locales": {
109+
"pt-BR": {
110+
"translation": "src/locale/messages.pt-BR.xlf"
111+
}
112+
}
98113
}
99114
}
100115
}

package-lock.json

Lines changed: 180 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve",
7-
"build": "ng build",
7+
"build": "ng build --localize",
88
"watch": "ng build --watch --configuration development",
99
"test": "ng test",
1010
"serve:ssr:appoutlet.github.io": "node dist/appoutlet.github.io/server/server.mjs"
@@ -43,6 +43,7 @@
4343
"@angular/build": "^20.0.4",
4444
"@angular/cli": "^20.0.4",
4545
"@angular/compiler-cli": "^20.0.0",
46+
"@angular/localize": "^20.0.6",
4647
"@types/express": "^5.0.1",
4748
"@types/jasmine": "~5.1.0",
4849
"@types/node": "^20.17.19",

src/app/component/blog/blog.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ <h2 class="title is-2 has-text-centered mt-6">Latest Insights & Updates</h2>
2828
<p>{{ post.brief }}</p>
2929
</div>
3030

31-
<a [href]="post.url" target="_blank" class="button">
31+
<a [href]="post.url" target="_blank" class="button" i18n>
3232
<i class="ph ph-arrow-up-right mr-2"></i>
3333
Read the full article
3434
</a>

src/app/component/hero/hero.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<h1 class="title is-1 has-text-centered block">AppOutlet</h1>
1111

12-
<p class="title is-4 has-text-centered block pt-3 px-3">
12+
<p class="title is-4 has-text-centered block pt-3 px-3" i18n>
1313
Crafting exceptional mobile and desktop applications that work everywhere with <span class="brand-gradient-text">stunning design</span>
1414
</p>
1515

src/locale/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
h

src/locale/messages.pt-BR.xlf

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
3+
<file source-language="en" datatype="plaintext" original="ng2.template">
4+
<body>
5+
<trans-unit id="5591821559397741895" datatype="html">
6+
<source><x id="START_ITALIC_TEXT" ctype="x-i" equiv-text="&lt;i class=&quot;ph ph-arrow-up-right mr-2&quot;&gt;"/><x id="CLOSE_ITALIC_TEXT" ctype="x-i" equiv-text="&lt;/i&gt;"/> Read the full article </source>
7+
<target><x id="START_ITALIC_TEXT" ctype="x-i" equiv-text="&lt;i class=&quot;ph ph-arrow-up-right mr-2&quot;&gt;"/><x id="CLOSE_ITALIC_TEXT" ctype="x-i" equiv-text="&lt;/i&gt;"/> Leia o artigo completo </target>
8+
<context-group purpose="location">
9+
<context context-type="sourcefile">src/app/component/blog/blog.html</context>
10+
<context context-type="linenumber">32,34</context>
11+
</context-group>
12+
</trans-unit>
13+
<trans-unit id="4579298714588691402" datatype="html">
14+
<source> Crafting exceptional mobile and desktop applications that work everywhere with <x id="START_TAG_SPAN" ctype="x-span" equiv-text="&lt;span class=&quot;brand-gradient-text&quot;&gt;"/>stunning design<x id="CLOSE_TAG_SPAN" ctype="x-span" equiv-text="&lt;/span&gt;"/></source>
15+
<context-group purpose="location">
16+
<context context-type="sourcefile">src/app/component/hero/hero.html</context>
17+
<context context-type="linenumber">13,16</context>
18+
</context-group>
19+
</trans-unit>
20+
</body>
21+
</file>
22+
</xliff>

src/locale/messages.xlf

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
3+
<file source-language="en" datatype="plaintext" original="ng2.template">
4+
<body>
5+
<trans-unit id="5591821559397741895" datatype="html">
6+
<source><x id="START_ITALIC_TEXT" ctype="x-i" equiv-text="&lt;i class=&quot;ph ph-arrow-up-right mr-2&quot;&gt;"/><x id="CLOSE_ITALIC_TEXT" ctype="x-i" equiv-text="&lt;/i&gt;"/> Read the full article </source>
7+
<context-group purpose="location">
8+
<context context-type="sourcefile">src/app/component/blog/blog.html</context>
9+
<context context-type="linenumber">32,34</context>
10+
</context-group>
11+
</trans-unit>
12+
<trans-unit id="4579298714588691402" datatype="html">
13+
<source> Crafting exceptional mobile and desktop applications that work everywhere with <x id="START_TAG_SPAN" ctype="x-span" equiv-text="&lt;span class=&quot;brand-gradient-text&quot;&gt;"/>stunning design<x id="CLOSE_TAG_SPAN" ctype="x-span" equiv-text="&lt;/span&gt;"/></source>
14+
<context-group purpose="location">
15+
<context context-type="sourcefile">src/app/component/hero/hero.html</context>
16+
<context context-type="linenumber">13,16</context>
17+
</context-group>
18+
</trans-unit>
19+
</body>
20+
</file>
21+
</xliff>

src/main.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/// <reference types="@angular/localize" />
2+
13
import { bootstrapApplication } from '@angular/platform-browser';
24
import { appConfig } from './app/app.config';
35
import { App } from './app/app';

tsconfig.app.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"compilerOptions": {
66
"outDir": "./out-tsc/app",
77
"types": [
8-
"node"
8+
"node",
9+
"@angular/localize"
910
]
1011
},
1112
"include": [

0 commit comments

Comments
 (0)