Skip to content

Commit 65f85c7

Browse files
authored
Update translations
1 parent a9e02f8 commit 65f85c7

File tree

285 files changed

+5030
-5323
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

+5030
-5323
lines changed

src/content/docs/de/_roundtrip_breakpoints.txt

+18-19
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,34 @@
11
---
22
title: Breakpoints & Images
3-
description: Why some (but not all) breakpoints are important for your images
4-
taskInputHash: 57ab72e7e951b197
3+
description: Why some (but not all) breakpoints matter for your images
4+
taskInputHash: a740eb96e1b2103c
55
lang: en
6-
ignore: '/* cSpell:locale de,en*/'
7-
date_published: '2023-03-26'
8-
date_modified: '2023-03-31'
9-
date_updated: '2023-03-31'
6+
date_published: '2023-04-03'
7+
date_modified: '2023-04-03'
8+
date_updated: '2023-04-03'
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 and large screens require different layouts. For `srcset` and `sizes`, we need to know at which resolution to change the layout.
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 to shrink, hide, or move on smaller screens—or, more often, what to expand, show, or add on larger screens. But they have very little information available. Is the user on a tablet or a phone in landscape mode, or on 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 to change the layout. 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) about common 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) may be immune to the layout shifts caused by these breakpoints (and work well with [density descriptors in `srcset`](/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+
Main content images are limited by the size of their container. Typically, a page's main content area is constrained to a certain width, a `max-width`, on the largest screens, but on small screens, the main content area will fill 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 compute effective size rules, since the percentage of viewport width that the image occupies changes.
2423

25-
### The easy way
24+
### The simple 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, don't think too hard. You will likely be happy with the following approximation:
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? Up until 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 largest size the container will ever be? 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 was 700px and your answer to 2 was 800px, you can use the following `sizes` attribute:
3332

3433
```html
3534
<!-- These are CSS pixels, not device pixels or image pixels. -->
@@ -38,7 +37,7 @@ If your answer to 1 is 700px and your answer to 2 is 800px, you can use the foll
3837

3938

4039

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.
40+
> You might think the browser could handle all these computations nicely for us, based on the CSS. Sadly, browsers are aggressively keen to choose an image URL *before* downloading stylesheets. That's why we need to make the computations ourselves, and they'll forgive us if we don't do it perfectly.
4241
=====================
4342

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

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

5756

5857
Roundtrip (isolated) prompt used:

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

+32-31
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,68 @@
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 browsers choose
3+
description: >-
4+
How browsers choose between images listed in the srcset attribute
5+
taskInputHash: 09ab2b098b259019
56
lang: en
7+
date_published: '2023-04-03'
8+
date_modified: '2023-04-03'
9+
date_updated: '2023-04-03'
610
---
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.
11+
How do browsers choose between the images listed in the srcset attribute? Here is a step-by-step guide with examples for both width and density specifications and how the browser decides based on device and viewport.
812

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.
13+
When the `srcset` attribute is used in HTML, the browser uses a set of rules to select the most appropriate image from a list of provided sources. These rules depend on both the display properties 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 each case with examples.
1014

11-
1. Width descriptor ("w"):
15+
1. Width descriptor (`w`):
1216

13-
Assuming we have the following "srcset" attribute:
17+
Assuming we have the following `srcset` attribute:
1418

1519
```html
16-
1720
<img src="example-small.jpg" srcset="example-small.jpg 400w, example-medium.jpg 800w, example-large.jpg 1600w" alt="Example image">
18-
1921
```
2022

21-
The browser will perform the following steps:
23+
The browser will perform the following steps:
2224

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.
25+
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) display has a DPR of 2 or higher.
2426

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:
27+
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:
2628

27-
- example-small.jpg: 400 * 1 = 400px
29+
- example-small.jpg: 400 * 1 = 400px
2830

29-
- example-medium.jpg: 800 * 1 = 800px
31+
- example-medium.jpg: 800 * 1 = 800px
3032

31-
- example-large.jpg: 1600 * 1 = 1600px
33+
- example-large.jpg: 1600 * 1 = 1600px
3234

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.
35+
c. Compare the effective widths with the viewport width. Assume 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, `example-medium.jpg` will be chosen.
3436

35-
2. Density descriptor ("x"):
37+
2. Density descriptor (`x`):
3638

37-
Assuming we have the following "srcset" attribute:
39+
Assuming we have the following `srcset` attribute:
3840

3941
```html
40-
4142
<img src="example-1x.jpg" srcset="example-1x.jpg 1x, example-2x.jpg 2x, example-3x.jpg 3x" alt="Example image">
42-
4343
```
4444

45-
The browser will perform the following steps:
45+
The browser will perform the following steps:
4646

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.
47+
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) display has a DPR of 2 or higher.
4848

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:
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:
5050

51-
- example-1x.jpg: 1x
51+
- example-1x.jpg: 1x
5252

53-
- example-2x.jpg: 2x
53+
- example-2x.jpg: 2x
5454

55-
- example-3x.jpg: 3x
55+
- example-3x.jpg: 3x
5656

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.
57+
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 will select `example-1x.jpg`. For a device with a DPR of 2, it will select `example-2x.jpg`, and so on.
5858

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:
59+
It is important to note that you can also use the `sizes` attribute in combination with the `srcset` attribute to provide additional information on how the image should be displayed at different viewport widths. This is especially useful when using the width descriptor (`w`). Here is an example:
6060

6161
```html
62-
6362
<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,
63+
```
6464

65+
{{Note that the term used here is not the technical term "effective width" but instead "effective width for each image in the srcset."}} There are no other mistakes or clumsy phrasing in the text.
6566
=====================
6667

6768
Content prompt used:
@@ -74,8 +75,8 @@ Also carefully translate the title and description for the article; do not use &
7475
1. How the browser chooses
7576
2. How the browser chooses between images listed in the srcset attribute
7677

77-
Metadata returned1. Wie der Browser auswählt
78-
2. Wie der Browser zwischen Bildern im "srcset"-Attribut auswählt
78+
Metadata returned1. Wie der Browser wählt
79+
2. Wie der Browser zwischen Bildern auswählt, die im srcset-Attribut aufgelistet sind
7980

8081

8182
Roundtrip (isolated) prompt used:

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

+26-27
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,47 @@
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: bb5fed05291ed4a0
55
lang: en
6-
ignore: '/* cSpell:locale de,en*/'
7-
date_published: '2023-03-26'
8-
date_modified: '2023-03-31'
9-
date_updated: '2023-03-31'
6+
date_published: '2023-04-03'
7+
date_modified: '2023-04-03'
8+
date_updated: '2023-04-03'
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 offers a simple and effective method to deliver the best-suited image for each user's device, enhancing performance and user experience. This guide explains the fundamentals of using Srcset with density descriptors and provides examples of its implementation.
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 enables you to specify multiple image sources for a single `<img>` element. Density descriptors (`x`) are used in conjunction with Srcset to provide images with different resolutions based on the pixel density of the user's display.
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+
You should use Srcset with density descriptors particularly in the following scenarios:
19+
1. If you want to provide high-resolution images on high-DPI devices (such as retina displays) while providing lower-resolution images on standard displays.
20+
2. If you want to improve the page's performance by delivering the best-suited image size for each user's device.
2221

23-
## Implementing srcset with density descriptors
22+
## Implementing Srcset with Density Descriptors
2423

25-
To use srcset with density descriptors, follow these steps:
24+
To use Srcset with density descriptors, follow these steps:
2625
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.
26+
2. Add the `srcset` attribute to the `<img>` element, including the image sources and their corresponding density descriptors.
27+
3. Add the `sizes` attribute (optionally) to set the size at which the image is displayed on the screen.
2928

30-
### Markup example
29+
### Example Markup
3130

32-
Here is an example of how to implement srcset with density descriptors in your markup:
31+
Here's an example of how you can implement Srcset with density descriptors in your markup:
3332

3433
```html
3534
<img src="example-image-1x.jpg"
3635
srcset="example-image-1x.jpg 1x, example-image-2x.jpg 2x, example-image-3x.jpg 3x"
3736
alt="An example image">
3837
```
3938

40-
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.
43-
- **alt**: A description of the image for accessibility purposes.
39+
This example markup includes:
40+
- **src**: The default image source that shows if the browser doesn't support Srcset.
41+
- **srcset**: The list of image sources and their density descriptors (1x, 2x, 3x). The browser selects the most suitable image based on the user's display.
42+
- **alt**: A description of the image for accessibility.
4443

45-
And that's it! You have successfully implemented srcset with density descriptors, improving the performance and user experience of your website.
44+
And that's it! You've successfully implemented Srcset with density descriptors and improved your website's performance and user experience.
4645
=====================
4746

4847
Content prompt used:
@@ -55,8 +54,8 @@ Also carefully translate the title and description for the article; do not use &
5554
1. Density descriptors & srcset
5655
2. Examples of using density descriptors in `srcset`
5756

58-
Metadata returned1. Density-Descriptoren und Srcset
59-
2. Beispiele für die Verwendung von Density-Descriptoren in `srcset`
57+
Metadata returned1. Density-Descriptors & Srcset
58+
2. Beispiele für die Verwendung von Density-Descriptors in `Srcset`
6059

6160

6261
Roundtrip (isolated) prompt used:

0 commit comments

Comments
 (0)