Skip to content

Commit 8fe878b

Browse files
authored
Merge pull request #3 from reactjs/innsetning
Installation / Innsetning
2 parents 521affb + 9c550f3 commit 8fe878b

11 files changed

+206
-200
lines changed

src/components/Layout/HomeContent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ export function HomeContent() {
139139
type="primary"
140140
size="lg"
141141
className="w-full sm:w-auto justify-center"
142-
label="Lærðu React">
143-
Lærðu React
142+
label="Lærðu á React">
143+
Lærðu á React
144144
</ButtonLink>
145145
<ButtonLink
146146
href={'/reference/react'}

src/components/MDX/ExpandableCallout.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ interface ExpandableCalloutProps {
1818

1919
const variantMap = {
2020
deprecated: {
21-
title: 'Deprecated',
21+
title: 'Óæskilegt',
2222
Icon: IconWarning,
2323
containerClasses: 'bg-red-5 dark:bg-red-60 dark:bg-opacity-20',
2424
textColor: 'text-red-50 dark:text-red-40',
2525
overlayGradient:
2626
'linear-gradient(rgba(249, 247, 243, 0), rgba(249, 247, 243, 1)',
2727
},
2828
note: {
29-
title: 'Note',
29+
title: 'Athugið',
3030
Icon: IconNote,
3131
containerClasses:
3232
'bg-green-5 dark:bg-green-60 dark:bg-opacity-20 text-primary dark:text-primary-dark text-lg',
@@ -35,15 +35,15 @@ const variantMap = {
3535
'linear-gradient(rgba(245, 249, 248, 0), rgba(245, 249, 248, 1)',
3636
},
3737
pitfall: {
38-
title: 'Pitfall',
38+
title: 'Gryfja',
3939
Icon: IconPitfall,
4040
containerClasses: 'bg-yellow-5 dark:bg-yellow-60 dark:bg-opacity-20',
4141
textColor: 'text-yellow-50 dark:text-yellow-40',
4242
overlayGradient:
4343
'linear-gradient(rgba(249, 247, 243, 0), rgba(249, 247, 243, 1)',
4444
},
4545
wip: {
46-
title: 'Under Construction',
46+
title: 'Í vinnslu',
4747
Icon: IconNote,
4848
containerClasses: 'bg-yellow-5 dark:bg-yellow-60 dark:bg-opacity-20',
4949
textColor: 'text-yellow-50 dark:text-yellow-40',

src/components/MDX/ExpandableExample.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ function ExpandableExample({children, excerpt, type}: ExpandableExampleProps) {
7171
{isDeepDive && (
7272
<>
7373
<IconDeepDive className="inline mr-2 dark:text-purple-30 text-purple-40" />
74-
Deep Dive
74+
Köfum dýpra
7575
</>
7676
)}
7777
{isExample && (
7878
<>
7979
<IconCodeBlock className="inline mr-2 dark:text-yellow-30 text-yellow-50" />
80-
Example
80+
Dæmi
8181
</>
8282
)}
8383
</h5>
@@ -101,7 +101,7 @@ function ExpandableExample({children, excerpt, type}: ExpandableExampleProps) {
101101
<span className="mr-1">
102102
<IconChevron displayDirection={isExpanded ? 'up' : 'down'} />
103103
</span>
104-
{isExpanded ? 'Hide Details' : 'Show Details'}
104+
{isExpanded ? 'Fela' : 'Sjá smáatriði'}
105105
</Button>
106106
</summary>
107107
<div

src/content/learn/add-react-to-an-existing-project.md

Lines changed: 57 additions & 56 deletions
Large diffs are not rendered by default.

src/content/learn/editor-setup.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,62 @@
11
---
2-
title: Editor Setup
2+
title: Uppsetning á ritli
33
---
44

55
<Intro>
66

7-
A properly configured editor can make code clearer to read and faster to write. It can even help you catch bugs as you write them! If this is your first time setting up an editor or you're looking to tune up your current editor, we have a few recommendations.
7+
Það getur haft mikið að segja að hafa ritilinn sinn almennilega uppsettan, enda getur hann hjálpað við að finna villur jafnóðum og kóðinn er skrifaður. Við erum með nokkrar tillögur handa þeim sem hafa áhuga á að breyta stillingunum fyrir ritilinn sinn.
88

99
</Intro>
1010

1111
<YouWillLearn>
1212

13-
* What the most popular editors are
14-
* How to format your code automatically
13+
* Hvaða ritlar eru vinsælastir
14+
* Hvernig er hægt að sníða kóðann sjálfvirkt
1515

1616
</YouWillLearn>
1717

18-
## Your editor {/*your-editor*/}
18+
## Ritillinn þinn {/*your-editor*/}
1919

20-
[VS Code](https://code.visualstudio.com/) is one of the most popular editors in use today. It has a large marketplace of extensions and integrates well with popular services like GitHub. Most of the features listed below can be added to VS Code as extensions as well, making it highly configurable!
20+
[VS Code](https://code.visualstudio.com/) er á meðal allravinsælustu ritla í notkun. Margar viðbætur eru í boði og ritillinn samtengist vel vinsælum þjónustum eins og GitHub. Flest þau sérkenni sem útlistuð eru á þessari síðu eru studd og hann er auðstillanlegur.
2121

22-
Other popular text editors used in the React community include:
22+
Á meðal annarra vinsælla ritla við React þróun má nefna:
2323

24-
* [WebStorm](https://www.jetbrains.com/webstorm/) is an integrated development environment designed specifically for JavaScript.
25-
* [Sublime Text](https://www.sublimetext.com/) has support for JSX and TypeScript, [syntax highlighting](https://stackoverflow.com/a/70960574/458193) and autocomplete built in.
26-
* [Vim](https://www.vim.org/) is a highly configurable text editor built to make creating and changing any kind of text very efficient. It is included as "vi" with most UNIX systems and with Apple OS X.
24+
* [WebStorm](https://www.jetbrains.com/webstorm/) er samþætt þróunarumhverfi (e. IDE) sérhannað fyrir JavaScript.
25+
* [Sublime Text](https://www.sublimetext.com/) er með innbyggðan stuðning fyrir JSX og TypeScript, [litakóðun fyrir málskipan](https://stackoverflow.com/a/70960574/458193), og sjálfvirkar útfyllingar á kóða.
26+
* [Vim](https://www.vim.org/) er einstaklega stillanlegur ritill sem var upphaflega þróaður til að gera hvers lags textavinnslu skilvirka. Fyrirrennari þess, „vi“, er innifalinn í flestum UNIX stýrikerfum, m.a. macOS.
2727

28-
## Recommended text editor features {/*recommended-text-editor-features*/}
28+
## Ritlasérkenni sem mælt er með {/*recommended-text-editor-features*/}
2929

30-
Some editors come with these features built in, but others might require adding an extension. Check to see what support your editor of choice provides to be sure!
30+
Sumir ritlar eru með þessi sérkenni innbyggð, en aðrir gætu karfist utanaðkomandi viðbótar. Athugaðu ritillinn þinn styður til að vera viss!
3131

32-
### Linting {/*linting*/}
32+
### Lóarar (e. linter) {/*linting*/}
3333

34-
Code linters find problems in your code as you write, helping you fix them early. [ESLint](https://eslint.org/) is a popular, open source linter for JavaScript.
34+
Lóarar finna vandamál í kóðanum á meðan þú skrifar hann og hjálpa þér að leysa þau sem fyrst. [ESLint](https://eslint.org/) er lóari fyrir JavaScript sem er opinn hugbúnaður.
3535

36-
* [Install ESLint with the recommended configuration for React](https://www.npmjs.com/package/eslint-config-react-app) (be sure you have [Node installed!](https://nodejs.org/en/download/current/))
37-
* [Integrate ESLint in VSCode with the official extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
36+
* [Innsettu ESLint með þeim stillingum sem mælt er með fyrir React](https://www.npmjs.com/package/eslint-config-react-app) (gakktu úr skugga um að [Node.js sé uppsett!](https://nodejs.org/en/download/current/))
37+
* [Notaðu ESLint í VS Code með opinberu viðbótinni](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
3838

39-
**Make sure that you've enabled all the [`eslint-plugin-react-hooks`](https://www.npmjs.com/package/eslint-plugin-react-hooks) rules for your project.** They are essential and catch the most severe bugs early. The recommended [`eslint-config-react-app`](https://www.npmjs.com/package/eslint-config-react-app) preset already includes them.
39+
**Gakktu úr skugga um að allar reglurnar í [`eslint-plugin-react-hooks`](https://www.npmjs.com/package/eslint-plugin-react-hooks) séu í notkun.** Þær eru bráðnauðsynlegar og hjálpa þér að finna allar vandamestu villurnar strax.
4040

41-
### Formatting {/*formatting*/}
41+
### Forsnið {/*formatting*/}
4242

43-
The last thing you want to do when sharing your code with another contributor is get into an discussion about [tabs vs spaces](https://www.google.com/search?q=tabs+vs+spaces)! Fortunately, [Prettier](https://prettier.io/) will clean up your code by reformatting it to conform to preset, configurable rules. Run Prettier, and all your tabs will be converted to spaces—and your indentation, quotes, etc will also all be changed to conform to the configuration. In the ideal setup, Prettier will run when you save your file, quickly making these edits for you.
43+
Það síðasta sem flestir vilja standa í þegar unnið er að kóða í sameiningu með öðrum er að lenda í deilum um [dálkhök og bil](https://www.google.com/search?q=tabs+vs+spaces)! Sem betur fer erum við með [Prettier](https://prettier.io/) sem getur hreinsað kóðan þinn með því að sníða hann eftir ákveðnum stillingum. Keyrðu Prettier og það mun breyta öllum dálkhökum í bil–og inndrátturinn, gæsalappir, o.s.frv. verður breytt í samræmi við stillingarnar. Það er upplagt að stilla ritilinn þannig að Prettier keyri sjálfvirkt þegar þú vistar skrá.
4444

45-
You can install the [Prettier extension in VSCode](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) by following these steps:
45+
Þú getur innset [Prettier viðbótina í VS Code](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) með því að fylgja þessum leiðbeiningum:
4646

47-
1. Launch VS Code
48-
2. Use Quick Open (press Ctrl/Cmd+P)
49-
3. Paste in `ext install esbenp.prettier-vscode`
50-
4. Press Enter
47+
1. Ræstu VS Code
48+
2. Notaðu flýtivalmynd (ýttu á `CTRL/CMD + P`)
49+
3. Límdu `ext install esbenp.prettier-vscode`
50+
4. Ýttu á færslulykil
5151

52-
#### Formatting on save {/*formatting-on-save*/}
52+
#### Að sníða sjálfvirkt við vistun {/*formatting-on-save*/}
5353

54-
Ideally, you should format your code on every save. VS Code has settings for this!
54+
Það er ákjósanlegt að sníða kóða sjálfvirkt þegar hann er vistaður. VS Code er með stillingu til þess að gera þetta!
5555

56-
1. In VS Code, press `CTRL/CMD + SHIFT + P`.
57-
2. Type "settings"
58-
3. Hit Enter
59-
4. In the search bar, type "format on save"
60-
5. Be sure the "format on save" option is ticked!
56+
1. Í VS Code, ýttu á `CTRL/CMD + SHIFT + P`
57+
2. Skrifaðu „settings
58+
3. Ýttu á færslulykil
59+
4. Skrifaðu „format on save“ í leitinni
60+
5. Hakaðu við „format on save
6161

62-
> If your ESLint preset has formatting rules, they may conflict with Prettier. We recommend disabling all formatting rules in your ESLint preset using [`eslint-config-prettier`](https://github.com/prettier/eslint-config-prettier) so that ESLint is *only* used for catching logical mistakes. If you want to enforce that files are formatted before a pull request is merged, use [`prettier --check`](https://prettier.io/docs/en/cli.html#--check) for your continuous integration.
62+
> Ef þú ert með ESLint uppsett þá gætirðu lent í því að stillingar þess séu ekki í samræmi við stillingarnar á Prettier. Það er mælt með að afstilla allar sniðsstillingar í ESLint með því að nota [`eslint-config-prettier`](https://github.com/prettier/eslint-config-prettier) og þá kannar ESLint bara notkunarvillur. Notaðu [`prettier --check`](https://prettier.io/docs/en/cli.html#--check) í prófanaferlinu til að sjá um að allar skrár séu sniðnar sjálfvirkt áður en kóðagrein er tvinnuð.

src/content/learn/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: Fyrstu skref
2+
title: Fyrstu skrefin
33
---
44

55
<Intro>
66

7-
Velkomin í skjalbúnað Reacts! Þessi síða veitir innsýn í öll þau helstu hugtök sem þú þarft að kunna skil á til að geta notað React dagsdaglega.
7+
Velkomin í skjalbúnaðinn fyrir React! Þessi síða veitir innsýn í öll þau helstu hugtök sem þú þarft að kunna skil á til að geta notað React dagsdaglega.
88

99
</Intro>
1010

src/content/learn/installation.md

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,56 @@
11
---
2-
title: Installation
2+
title: Innsetning
33
---
44

55
<Intro>
66

7-
React has been designed from the start for gradual adoption. You can use as little or as much React as you need. Whether you want to get a taste of React, add some interactivity to an HTML page, or start a complex React-powered app, this section will help you get started.
7+
React var hannað þannig að hægt sé að byrja að nota það hægt og rólega. Þú getur notað React eins lítið eða eins mikið og þú þarft. Hvort sem þig langar bara að finna smjörþefinn af React, bæta við gagnvirkni á HTML síðu, eða byrja á flóknu React verkefni, þá er þetta svæði fyrir þig.
88

99
</Intro>
1010

1111
<YouWillLearn isChapter={true}>
1212

13-
* [How to start a new React project](/learn/start-a-new-react-project)
14-
* [How to add React to an existing project](/learn/add-react-to-an-existing-project)
15-
* [How to set up your editor](/learn/editor-setup)
16-
* [How to install React Developer Tools](/learn/react-developer-tools)
13+
* [Byrjaðu á nýju React verkefni](/learn/start-a-new-react-project)
14+
* [Innsetning á React í tiltæku verkefni](/learn/add-react-to-an-existing-project)
15+
* [Uppsetning á ritli](/learn/editor-setup)
16+
* [Þróunartól fyrir React](/learn/react-developer-tools)
1717

1818
</YouWillLearn>
1919

20-
## Try React {/*try-react*/}
20+
## Prófaðu React {/*try-react*/}
2121

22-
You don't need to install anything to play with React. Try editing this sandbox!
22+
Þú þarft ekki að innsetja neitt til að byrja að fikta í React. Prófaðu að breyta kóðanum í þessum sandkassa!
2323

2424
<Sandpack>
2525

2626
```js
27-
function Greeting({ name }) {
28-
return <h1>Hello, {name}</h1>;
27+
function Heilsun({ nafn }) {
28+
return <h1>Halló, {nafn}</h1>;
2929
}
3030

31-
export default function App() {
32-
return <Greeting name="world" />
31+
export default function Forrit() {
32+
return <Heilsun nafn="heimur" />
3333
}
3434
```
3535

3636
</Sandpack>
3737

38-
You can edit it directly or open it in a new tab by pressing the "Fork" button in the upper right corner.
38+
Þú getur breytt kóðanum beint eða opnað sandkassan í nýjum flipa með því að smella á „Fork“ hnappinn í efri hægri kantinum.
3939

40-
Most pages in the React documentation contain sandboxes like this. Outside of the React documentation, there are many online sandboxes that support React: for example, [CodeSandbox](https://codesandbox.io/s/new), [StackBlitz](https://stackblitz.com/fork/react), or [CodePen.](https://codepen.io/pen?&editors=0010&layout=left&prefill_data_id=3f4569d1-1b11-4bce-bd46-89090eed5ddb)
40+
Flestar síðurnar í React skjalbúnaðinum innihalda sandkassa eins og þennan. Fyrir utan þessa vefsíðu eru til aðrir sandkassar á veraldarvefnum sem styðja React: til dæmis [CodeSandbox](https://codesandbox.io/s/new), [StackBlitz](https://stackblitz.com/fork/react), og [CodePen.](https://codepen.io/pen?&editors=0010&layout=left&prefill_data_id=3f4569d1-1b11-4bce-bd46-89090eed5ddb)
4141

42-
### Try React locally {/*try-react-locally*/}
42+
### Prófaðu React á eigin vél {/*try-react-locally*/}
4343

44-
To try React locally on your computer, [download this HTML page.](https://gist.githubusercontent.com/gaearon/0275b1e1518599bbeafcde4722e79ed1/raw/db72dcbf3384ee1708c4a07d3be79860db04bff0/example.html) Open it in your editor and in your browser!
44+
[Sæktu þessa HTML skrá](https://gist.githubusercontent.com/gaearon/0275b1e1518599bbeafcde4722e79ed1/raw/db72dcbf3384ee1708c4a07d3be79860db04bff0/example.html) til að prófa React staðbundið á eigin vél. Prófaðu að opna hana í eigin ritli og í vafranum þínum!
4545

46-
## Start a new React project {/*start-a-new-react-project*/}
46+
## Byrjaðu á nýju React verkefni {/*start-a-new-react-project*/}
4747

48-
If you want to build an app or a website fully with React, [start a new React project.](/learn/start-a-new-react-project)
48+
Skoðaðu [leiðbeiningar um uppsetningu á nýju React verkefni](/learn/start-a-new-react-project) ef þú vilt smíða vefforrit eða vefsíðu frá grunni með React.
4949

50-
## Add React to an existing project {/*add-react-to-an-existing-project*/}
50+
## Bættu React við tiltækt verkefni {/*add-react-to-an-existing-project*/}
5151

52-
If want to try using React in your existing app or a website, [add React to an existing project.](/learn/add-react-to-an-existing-project)
52+
Skoðaðu [leiðbeiningar um innsetningu á React í tiltæku verkefni](/learn/add-react-to-an-existing-project) ef þú vilt prófa að nota React í núverandi verkefni.
5353

54-
## Next steps {/*next-steps*/}
55-
56-
Head to the [Quick Start](/learn) guide for a tour of the most important React concepts you will encounter every day.
54+
## Næstu skref {/*next-steps*/}
5755

56+
Kíktu á [fyrstu skref](/learn) til að fá heildaryfirsýn á React og þeim hugtökum sem þú munt koma til með að nota dagsdaglega.

0 commit comments

Comments
 (0)