Skip to content

Commit 764c8ae

Browse files
authored
Update translations
1 parent 84d6d96 commit 764c8ae

File tree

285 files changed

+4890
-4942
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

285 files changed

+4890
-4942
lines changed

src/content/docs/de/_roundtrip_breakpoints.txt

+16-19
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,41 @@
11
---
22
title: Breakpoints & Images
33
description: Why some (but not all) breakpoints are important for your images
4-
taskInputHash: 57ab72e7e951b197
4+
taskInputHash: c4a3c6347eb6480a
55
lang: en
6-
ignore: '/* cSpell:locale de,en*/'
7-
date_published: '2023-03-26'
6+
date_published: '2023-03-31'
87
date_modified: '2023-03-31'
98
date_updated: '2023-03-31'
109
---
1110
### Background
1211

13-
Small screens and big monitors require different layouts. For `srcset` and `sizes`, we need to know when the layout changes.
12+
Small screens and large monitors require different layouts. For `srcset` and `sizes`, we need to know when the layout changes.
1413

15-
Web developers need to decide what should be scaled down, hidden, or moved on smaller screens - or decide what should be expanded, revealed, or added on larger screens. They also have very little information available. Is the user on a tablet or phone in landscape mode or in a small browser window?
14+
Web developers need to decide what should be shrunk, hidden, or shifted on smaller screens—or, more commonly, what should be expanded, revealed, or added on larger screens. They also have very few clues. Is the user on a tablet or phone in landscape, or in a small browser window?
1615

17-
We have to choose an arbitrary viewport width at which the layout changes. This is called a **breakpoint**. It can be any number of CSS pixels ([not device pixels](/en/pixels-not-pixels)). Polypane has a [great article](https://polypane.app/blog/the-breakpoints-we-tested-in-2021-and-the-ones-to-test-in-2022/#the-breakpoints-to-develop-on-in-2023) on commonly used breakpoints.
16+
We need to choose an arbitrary viewport width at which the layout changes. This is called a **breakpoint**. It's an arbitrary number of CSS pixels ([not device pixels](/en/pixels-not-pixels)). Polypane has a [great article](https://polypane.app/blog/the-breakpoints-we-tested-in-2021-and-the-ones-to-test-in-2022/#the-breakpoints-to-develop-on-in-2023) on commonly used breakpoints.
1817

19-
Some images (like logos, icons, or buttons) can be immune to the layout shifts caused by these breakpoints (and are okay with [srcset density descriptors](/en/density-descriptors)).
18+
Some images (like logos, icons, or buttons) might be immune to layout shifts caused by these breakpoints and are fine with [srcset density descriptors](/en/density-descriptors).
2019

21-
Main content images are limited by the size of their container. Typically, the main area of a page layout is constrained to a specific width, a `max-width`, on the largest screens, but on small screens the main content area fills the entire viewport.
20+
Images in the main content are constrained by the size of their container. Usually, the main content area of a page is limited to a certain width on the largest screens, a `max-width`, but on small screens, the main content area fills the entire viewport.
2221

23-
When you have more than one column at some breakpoints, it becomes difficult to compute the effective size rules because the percentage of viewport width taken up by the image changes.
22+
If you have more than one column at some breakpoints, it becomes harder to calculate the effective sizing rules since the percentage of viewport width that the image occupies changes.
2423

25-
### The easy way
24+
### The easy method
2625

27-
That doesn't mean you should smash your head against the wall. You will likely get very far with the following approach:
26+
Still, you shouldn't overthink this. With the following approach, you'll likely do just fine:
2827

29-
1. At what size does the main column (or the container of the image) stop growing? Until that viewport width, we can use `100vw` for the `sizes` attribute of the image to indicate that the image takes up 100% of the viewport width.
30-
2. What is the maximum width the container will ever be? We can set that as a fixed `width` for everything else.
28+
1. At what size does the main column (or the image's container) stop growing? Below that viewport width, we can use `100vw` for the image's `sizes` attribute to say that the image takes up 100% of the viewport width.
29+
2. What's the maximum width that this container ever reaches? We can set that as a fixed `width` for everything else.
3130

32-
If your answer to 1 is 700px and your answer to 2 is 800px, you can use the following `sizes` attribute:
31+
If your answer to 1 is 700px, and your answer to 2 is 800px, you can use the following `sizes` attribute:
3332

3433
```html
3534
<!-- These are CSS pixels, not device pixels or image pixels. -->
36-
<img [...] sizes="(max-width: 700px) 100vw, 800px" />
35+
<img [...] sizes="(max-width: 700px) 100vw, 800px"/>
3736
```
3837

39-
40-
41-
> You would think that the browser could kindly do all these calculations for us based on the CSS. Unfortunately, browsers are aggressively trying to choose an image URL *before* downloading stylesheets. So we have to do the calculations ourselves. And if we're not perfect, that's their problem.
38+
> You might think that the browser could do all these calculations for us nicely based on CSS. Unfortunately, browsers are very eager to pick an image URL *before* downloading the stylesheets. So we have to do the calculations ourselves, and it's their prerogative to handle it gracefully if we don't get it perfect.
4239
=====================
4340

4441
Content prompt used:
@@ -52,7 +49,7 @@ Also carefully translate the title and description for the article; do not use &
5249
2. Why some (but not all) breakpoints matter for your images
5350

5451
Metadata returned1. Breakpoints & Bilder
55-
2. Warum manche (aber nicht alle) Breakpoints wichtig für Ihre Bilder sind
52+
2. Warum einige (aber nicht alle) Breakpoints für Ihre Bilder wichtig sind
5653

5754

5855
Roundtrip (isolated) prompt used:

src/content/docs/de/_roundtrip_browser-picks-srcset.txt

+21-26
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,61 @@
11
---
2-
title: How the Browser selects
3-
description: How the browser selects between images listed in the "srcset" attribute
4-
taskInputHash: 21fa78dd27583003
2+
title: How the browser chooses
3+
description: How the browser selects between images in the srcset attribute
4+
taskInputHash: de4c5e9ccd50e3e2
55
lang: en
6+
date_published: '2023-03-31'
7+
date_modified: '2023-03-31'
8+
date_updated: '2023-03-31'
69
---
7-
How does the browser select between images listed in the "srcset" attribute? Here is a step-by-step guide with examples for both width and density descriptors and how the browser decides based on the device and viewport.
10+
How does the browser decide between images listed in the `srcset` attribute? Here are the steps with examples for both width and density specifications and how the browser decides based on device and viewport.
811

9-
- When using the "srcset" attribute in HTML, the browser uses a set of rules to select the most suitable image from a list of provided sources. These rules depend on both the display characteristics of the device (resolution, pixel density) and the size of the viewport. The "srcset" attribute allows you to specify different images based on width (using the "w" descriptor) or pixel density (using the "x" descriptor). Let's go through examples for both cases.
12+
- When using the `srcset` attribute in HTML, the browser uses a set of rules to select the best image from a list of provided sources. These rules depend both on the display properties of the device (resolution, pixel density) and on the viewport size. The `srcset` attribute allows you to specify different images based on width (using the `w` descriptor) or pixel density (using the `x` descriptor). Let's go through each case with examples.
1013

11-
1. Width descriptor ("w"):
14+
1. Width descriptor (`w`):
1215

13-
Assuming we have the following "srcset" attribute:
16+
Assume we have the following `srcset` attribute:
1417

1518
```html
16-
1719
<img src="example-small.jpg" srcset="example-small.jpg 400w, example-medium.jpg 800w, example-large.jpg 1600w" alt="Example image">
18-
1920
```
2021

2122
The browser will perform the following steps:
2223

23-
a. Determine the DPR (Device Pixel Ratio) of the device. For instance, a standard display has a DPR of 1, while a high-resolution (Retina) display has a DPR of 2 or higher.
24+
a. Determine the DPR (device pixel ratio) of the device. For example, a standard display has a DPR of 1, while a high-resolution (Retina) screen has a DPR of 2 or higher.
2425

25-
b. Calculate the effective width for each image in the "srcset". Multiply the width descriptor by the DPR. For a device with a DPR of 1:
26+
b. Calculate the effective width for each image in the `srcset`. Multiply the width descriptor by the DPR. For a device with a DPR of 1:
2627

2728
- example-small.jpg: 400 * 1 = 400px
28-
2929
- example-medium.jpg: 800 * 1 = 800px
30-
3130
- example-large.jpg: 1600 * 1 = 1600px
3231

33-
c. Compare the effective widths to the viewport width. Assuming the viewport width is 420px, the browser selects the smallest image whose effective width is greater than or equal to the viewport width. In this case, "example-medium.jpg" is selected.
32+
c. Compare the effective widths to the viewport width. Assuming the viewport width is 420px, the browser selects the smallest image with an effective width that is greater than or equal to the viewport width. In this case, it selects `example-medium.jpg`.
3433

35-
2. Density descriptor ("x"):
34+
2. Density descriptor (`x`):
3635

37-
Assuming we have the following "srcset" attribute:
36+
Assume we have the following `srcset` attribute:
3837

3938
```html
40-
4139
<img src="example-1x.jpg" srcset="example-1x.jpg 1x, example-2x.jpg 2x, example-3x.jpg 3x" alt="Example image">
42-
4340
```
4441

4542
The browser will perform the following steps:
4643

47-
a. Determine the DPR (Device Pixel Ratio) of the device. For instance, a standard display has a DPR of 1, while a high-resolution (Retina) display has a DPR of 2 or higher.
44+
a. Determine the DPR (device pixel ratio) of the device. For example, a standard display has a DPR of 1, while a high-resolution (Retina) screen has a DPR of 2 or higher.
4845

49-
b. Compare the device's DPR with the "x" descriptors in the "srcset". In this case, we have three images with the following descriptors:
46+
b. Compare the device's DPR with the `x` descriptors in the `srcset`. In this case, we have three images with the following descriptors:
5047

5148
- example-1x.jpg: 1x
52-
5349
- example-2x.jpg: 2x
54-
5550
- example-3x.jpg: 3x
5651

57-
c. Select the image with the "x" descriptor closest to the device's DPR. For a device with a DPR of 1, the browser selects "example-1x.jpg". For a device with a DPR of 2, it selects "example-2x.jpg", and so on.
52+
c. Select the image with the `x` descriptor that is closest to the device's DPR. For a device with a DPR of 1, the browser selects `example-1x.jpg`. For a device with a DPR of 2, it selects `example-2x.jpg`, and so on.
5853

59-
It is important to note that you can also use the "sizes" attribute in combination with the "srcset" attribute to provide further information on how the image should display at different viewport widths. This is particularly useful when using the width descriptor ("w"). Here is an example:
54+
It's important to note that you can use the `sizes` attribute in conjunction with the `srcset` attribute to provide more information on how the image will be displayed at different viewport widths. This is particularly useful when using the width descriptor (`w`). Here's an example:
6055

6156
```html
62-
6357
<img src="example-small.jpg" srcset="example-small.jpg 400w, example-medium.jpg 800w, example-large.jpg 1600w" sizes="(max-width: 480px) 100vw, (max-width: 960px) 50vw,
58+
```
6459

6560
=====================
6661

@@ -75,7 +70,7 @@ Also carefully translate the title and description for the article; do not use &
7570
2. How the browser chooses between images listed in the srcset attribute
7671

7772
Metadata returned1. Wie der Browser auswählt
78-
2. Wie der Browser zwischen Bildern im "srcset"-Attribut auswählt
73+
2. Wie der Browser zwischen Bildern im srcset-Attribut auswählt
7974

8075

8176
Roundtrip (isolated) prompt used:

src/content/docs/de/_roundtrip_density-descriptors.txt

+25-23
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,36 @@
11
---
2-
title: Density descriptors and srcset
3-
description: Examples of using density descriptors in `srcset`
4-
taskInputHash: 0a85d4f28fee785a
2+
title: Density Descriptors & Srcset
3+
description: Examples of using Density Descriptors in `srcset`
4+
taskInputHash: e8e75c8aa7c54e67
55
lang: en
6-
ignore: '/* cSpell:locale de,en*/'
7-
date_published: '2023-03-26'
6+
date_published: '2023-03-31'
87
date_modified: '2023-03-31'
98
date_updated: '2023-03-31'
109
---
11-
Srcset with density descriptors provides a simple and effective method for delivering the most appropriate image for each user's device, improving performance and user experience. This guide will take you through the basics of using srcset with density descriptors and provide markup examples for your convenience.
10+
Srcset with density descriptors provides a simple and effective way to deliver the most suitable image for each users device, enhancing performance and user experience. In this guide, you will learn the basics of using srcset with density descriptors and get markup examples to illustrate.
1211

13-
## What is srcset with density descriptors?
12+
## What is Srcset with Density Descriptors?
1413

15-
Srcset is an HTML attribute that allows you to specify multiple image sources for a single `<img>` element. Density descriptors (`x`) are used in conjunction with srcset to provide images at different resolutions based on the pixel density of the user's display.
14+
Srcset is an HTML attribute that allows you to specify multiple image sources for a single `<img>` element. Density descriptors ( `x` ) are used with srcset to provide images with different resolutions according to the pixel density of the user's screen.
1615

17-
## When to use srcset with density descriptors?
16+
## When to use Srcset with Density Descriptors?
1817

19-
Using srcset with density descriptors is especially useful when you:
20-
1. Want to provide high resolution images for high DPI displays (e.g. Retina displays) while using lower resolutions for standard displays.
21-
2. Want to improve page rendering by providing the most appropriate image size for each user's device.
18+
Using Srcset with Density Descriptors is particularly useful when you want to achieve the following:
2219

23-
## Implementing srcset with density descriptors
20+
1. Provide high-resolution images on high-resolution displays (e.g., retina displays) while providing low-resolution images on standard displays.
21+
2. Improve page performance by providing the most suitable image size for each user's device.
22+
23+
## Implementing Srcset with Density Descriptors
24+
25+
To use Srcset with Density Descriptors, follow these steps:
2426

25-
To use srcset with density descriptors, follow these steps:
2627
1. Prepare your images in different resolutions.
27-
2. Add the `srcset` attribute to the `<img>` element, including the image sources and corresponding density descriptors.
28-
3. Optionally, add the `sizes` attribute to set the size of the image on the screen.
28+
2. Add the `srcset` attribute to the `<img>` element, and specify the image sources along with the corresponding Density Descriptors.
29+
3. Add the `sizes` attribute (optional) to specify the size of the image on the screen.
2930

30-
### Markup example
31+
### Markup Example
3132

32-
Here is an example of how to implement srcset with density descriptors in your markup:
33+
Here is an example of how you can implement Srcset with Density Descriptors in your markup:
3334

3435
```html
3536
<img src="example-image-1x.jpg"
@@ -38,11 +39,12 @@ Here is an example of how to implement srcset with density descriptors in your m
3839
```
3940

4041
This markup example includes:
41-
- **src**: The default image source to be displayed when the browser does not support srcset.
42-
- **srcset**: The list of image sources and their density descriptors (1x, 2x, 3x). The browser chooses the most appropriate image based on the user's display.
42+
43+
- **src**: The default image source displayed if the browser doesn't support Srcset.
44+
- **srcset**: The list of image sources and their Density Descriptors (1x, 2x, 3x). The browser selects the most suitable image according to the user's display.
4345
- **alt**: A description of the image for accessibility purposes.
4446

45-
And that's it! You have successfully implemented srcset with density descriptors, improving the performance and user experience of your website.
47+
And that's it! You have successfully implemented Srcset with Density Descriptors, enhancing the performance and user experience of your website.
4648
=====================
4749

4850
Content prompt used:
@@ -55,8 +57,8 @@ Also carefully translate the title and description for the article; do not use &
5557
1. Density descriptors & srcset
5658
2. Examples of using density descriptors in `srcset`
5759

58-
Metadata returned1. Density-Descriptoren und Srcset
59-
2. Beispiele für die Verwendung von Density-Descriptoren in `srcset`
60+
Metadata returned1. Density-Descriptoren & Srcset
61+
2. Beispiele zur Verwendung von Density-Descriptoren in `srcset`
6062

6163

6264
Roundtrip (isolated) prompt used:

0 commit comments

Comments
 (0)