Skip to content

Commit e80c946

Browse files
Merge pull request #44 from MarkusNeusinger/copilot/sub-pr-43
fix: translate German text to English in library prompt files
2 parents d77292f + 855e618 commit e80c946

6 files changed

Lines changed: 67 additions & 67 deletions

File tree

prompts/library/altair.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import altair as alt
77
```
88

9-
## Chart erstellen
9+
## Create Chart
1010

1111
```python
1212
chart = alt.Chart(df).mark_point().encode(
@@ -22,16 +22,16 @@ chart = alt.Chart(df).mark_point().encode(
2222
## Encoding Types
2323

2424
```python
25-
# Q = Quantitative (numerisch)
25+
# Q = Quantitative (numeric)
2626
x='value:Q'
2727

28-
# N = Nominal (kategorisch, keine Ordnung)
28+
# N = Nominal (categorical, no order)
2929
color='category:N'
3030

31-
# O = Ordinal (kategorisch, mit Ordnung)
31+
# O = Ordinal (categorical, with order)
3232
x='month:O'
3333

34-
# T = Temporal (Datum/Zeit)
34+
# T = Temporal (date/time)
3535
x='date:T'
3636
```
3737

@@ -46,18 +46,18 @@ x='date:T'
4646
.mark_area() # Area
4747
```
4848

49-
## Speichern (PNG)
49+
## Save (PNG)
5050

5151
```python
5252
chart.save('plot.png', scale_factor=2.0)
5353
```
5454

55-
**Hinweis**: Benötigt `vl-convert-python` für PNG-Export.
55+
**Note**: Requires `vl-convert-python` for PNG export.
5656

57-
## Interaktivität
57+
## Interactivity
5858

5959
```python
60-
# Zoom/Pan aktivieren
60+
# Enable zoom/pan
6161
chart = chart.interactive()
6262

6363
# Tooltips

prompts/library/bokeh.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ from bokeh.models import ColumnDataSource
88
from bokeh.io import export_png
99
```
1010

11-
## Figure erstellen
11+
## Create Figure
1212

1313
```python
1414
p = figure(
@@ -20,39 +20,39 @@ p = figure(
2020
)
2121
```
2222

23-
## Plot-Methoden
23+
## Plot Methods
2424

2525
```python
26-
# Numerische Daten
26+
# Numeric data
2727
p.scatter(x='x', y='y', source=source)
2828
p.line(x='x', y='y', source=source)
2929

30-
# WICHTIG: Kategorische Achsen
31-
p = figure(x_range=categories, ...) # x_range definieren!
30+
# IMPORTANT: Categorical axes
31+
p = figure(x_range=categories, ...) # define x_range!
3232
source = ColumnDataSource(data={'x': cat_data, 'y': num_data})
3333
p.scatter(x='x', y='y', source=source)
3434
```
3535

3636
## ColumnDataSource
3737

3838
```python
39-
# Immer ColumnDataSource verwenden für Flexibilität
39+
# Always use ColumnDataSource for flexibility
4040
source = ColumnDataSource(data={
4141
'x': df['col_x'],
4242
'y': df['col_y'],
4343
'color': df['col_color']
4444
})
4545
```
4646

47-
## Speichern (PNG)
47+
## Save (PNG)
4848

4949
```python
5050
from bokeh.io import export_png
5151

5252
export_png(p, filename='plot.png')
5353
```
5454

55-
**Hinweis**: Benötigt `selenium` und WebDriver für PNG-Export.
55+
**Note**: Requires `selenium` and WebDriver for PNG export.
5656

5757
## Styling
5858

@@ -66,17 +66,17 @@ p.yaxis.axis_label = y_label
6666

6767
`plots/bokeh/{glyph_method}/`
6868

69-
| Methode | Folder |
70-
|---------|--------|
69+
| Method | Folder |
70+
|--------|--------|
7171
| `p.scatter()` | `scatter/` |
7272
| `p.line()` | `line/` |
7373
| `p.vbar()` | `vbar/` |
7474
| `p.hbar()` | `hbar/` |
75-
| Custom (kein natives) | `custom/` |
75+
| Custom (no native) | `custom/` |
7676

7777
## Return Type
7878

7979
```python
8080
def create_plot(...) -> figure:
81-
# Hinweis: bokeh.plotting.figure (lowercase)
81+
# Note: bokeh.plotting.figure (lowercase)
8282
```

prompts/library/highcharts.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
# highcharts
22

3-
**Hinweis**: Highcharts erfordert eine Lizenz für kommerzielle Nutzung.
3+
**Note**: Highcharts requires a license for commercial use.
44

55
## Import
66

77
```python
8-
# WICHTIG: Korrekter Import-Pfad
8+
# IMPORTANT: Correct import path
99
from highcharts_core.chart import Chart
1010
from highcharts_core.options import HighchartsOptions
1111
from highcharts_core.options.series.bar import BarSeries
1212
from highcharts_core.options.series.scatter import ScatterSeries
1313
```
1414

15-
## Chart erstellen
15+
## Create Chart
1616

1717
```python
1818
chart = Chart()
1919
chart.options = HighchartsOptions()
2020

21-
# Titel
21+
# Title
2222
chart.options.title = {'text': title}
2323

24-
# Achsen
24+
# Axes
2525
chart.options.x_axis = {'title': {'text': x_label}}
2626
chart.options.y_axis = {'title': {'text': y_label}}
2727
```
2828

29-
## Series hinzufügen
29+
## Add Series
3030

3131
```python
3232
from highcharts_core.options.series.scatter import ScatterSeries
@@ -38,7 +38,7 @@ series.name = 'Data'
3838
chart.add_series(series)
3939
```
4040

41-
## Series-Typen
41+
## Series Types
4242

4343
```python
4444
from highcharts_core.options.series.bar import BarSeries
@@ -52,10 +52,10 @@ from highcharts_core.options.series.boxplot import BoxPlotSeries
5252
## HTML Export
5353

5454
```python
55-
# Als HTML-String
55+
# As HTML string
5656
html = chart.to_js_literal()
5757

58-
# Als HTML-Datei
58+
# As HTML file
5959
with open('plot.html', 'w') as f:
6060
f.write(f'''
6161
<html>
@@ -79,10 +79,10 @@ from selenium import webdriver
7979
from selenium.webdriver.chrome.options import Options
8080

8181
def export_to_png(chart, filename='plot.png'):
82-
# HTML generieren
83-
html_content = f'''...''' # wie oben
82+
# Generate HTML
83+
html_content = f'''...''' # as above
8484

85-
# Selenium Screenshot
85+
# Selenium screenshot
8686
options = Options()
8787
options.add_argument('--headless')
8888
driver = webdriver.Chrome(options=options)
@@ -96,7 +96,7 @@ def export_to_png(chart, filename='plot.png'):
9696
driver.quit()
9797
```
9898

99-
## Chart-Größe
99+
## Chart Size
100100

101101
```python
102102
chart.options.chart = {

prompts/library/plotly.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44

55
```python
66
import plotly.graph_objects as go
7-
# oder
7+
# or
88
import plotly.express as px
99
```
1010

11-
## Figure erstellen
11+
## Create Figure
1212

1313
```python
1414
# Graph Objects
1515
fig = go.Figure()
1616
fig.add_trace(go.Scatter(x=x, y=y))
1717

18-
# Express (für schnelle Plots)
18+
# Express (for quick plots)
1919
fig = px.scatter(df, x='col_x', y='col_y')
2020
```
2121

@@ -32,18 +32,18 @@ fig.update_layout(
3232
)
3333
```
3434

35-
## Speichern (PNG)
35+
## Save (PNG)
3636

3737
```python
3838
fig.write_image('plot.png', width=1600, height=900, scale=2)
3939
```
4040

41-
**Hinweis**: Benötigt `kaleido` für PNG-Export.
41+
**Note**: Requires `kaleido` for PNG export.
4242

43-
## Interaktivität
43+
## Interactivity
4444

45-
Plotly ist standardmäßig interaktiv (Hover, Zoom, Pan).
46-
Für statische Outputs`write_image()`.
45+
Plotly is interactive by default (hover, zoom, pan).
46+
For static outputs`write_image()`.
4747

4848
## Folder-Name
4949

prompts/library/plotnine.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ from plotnine import (
1111
)
1212
```
1313

14-
## Plot erstellen
14+
## Create Plot
1515

1616
```python
1717
plot = (
@@ -28,36 +28,36 @@ plot = (
2828
plot = plot + theme(figure_size=(16, 9))
2929
```
3030

31-
## Speichern (PNG)
31+
## Save (PNG)
3232

3333
```python
3434
plot.save('plot.png', dpi=300)
3535
```
3636

37-
## Brewer Paletten
37+
## Brewer Palettes
3838

39-
**WICHTIG**: Palette-Typ muss zum Palette-Namen passen!
39+
**IMPORTANT**: Palette type must match the palette name!
4040

4141
```python
42-
# Qualitativ (kategorisch)
42+
# Qualitative (categorical)
4343
+ scale_fill_brewer(type='qual', palette='Set2')
4444
+ scale_fill_brewer(type='qual', palette='Paired')
4545
+ scale_fill_brewer(type='qual', palette='Dark2')
4646

47-
# Sequentiell (numerisch)
47+
# Sequential (numeric)
4848
+ scale_fill_brewer(type='seq', palette='Blues')
4949
+ scale_fill_brewer(type='seq', palette='Greens')
5050

51-
# Divergierend (um Nullpunkt)
51+
# Diverging (around zero)
5252
+ scale_fill_brewer(type='div', palette='RdBu')
5353
+ scale_fill_brewer(type='div', palette='PiYG')
5454
```
5555

5656
```python
57-
# FALSCH: Set2 ist NICHT sequentiell!
57+
# WRONG: Set2 is NOT sequential!
5858
+ scale_fill_brewer(type='seq', palette='Set2')
5959

60-
# RICHTIG: Set2 ist qualitativ
60+
# RIGHT: Set2 is qualitative
6161
+ scale_fill_brewer(type='qual', palette='Set2')
6262
```
6363

@@ -66,7 +66,7 @@ plot.save('plot.png', dpi=300)
6666
```python
6767
geom_point() # Scatter
6868
geom_line() # Line
69-
geom_bar() # Bar (stat='identity' für Werte)
69+
geom_bar() # Bar (stat='identity' for values)
7070
geom_boxplot() # Boxplot
7171
geom_histogram() # Histogram
7272
geom_tile() # Heatmap

prompts/library/pygal.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import pygal
77
from pygal.style import Style
88
```
99

10-
## Chart erstellen
10+
## Create Chart
1111

1212
```python
1313
chart = pygal.Bar(
@@ -19,35 +19,35 @@ chart = pygal.Bar(
1919
)
2020
```
2121

22-
## Chart-Typen
22+
## Chart Types
2323

2424
```python
25-
pygal.Bar() # Vertikale Balken
26-
pygal.HorizontalBar()# Horizontale Balken
27-
pygal.Line() # Linien
28-
pygal.XY() # Scatter (XY-Koordinaten)
29-
pygal.Pie() # Kreisdiagramm
25+
pygal.Bar() # Vertical bars
26+
pygal.HorizontalBar()# Horizontal bars
27+
pygal.Line() # Lines
28+
pygal.XY() # Scatter (XY coordinates)
29+
pygal.Pie() # Pie chart
3030
pygal.Box() # Boxplot
31-
pygal.Histogram() # Histogramm
31+
pygal.Histogram() # Histogram
3232
```
3333

34-
## Daten hinzufügen
34+
## Add Data
3535

3636
```python
3737
chart.add('Series 1', [1, 2, 3, 4])
3838
chart.add('Series 2', [4, 3, 2, 1])
3939

40-
# X-Achsen-Labels
40+
# X-axis labels
4141
chart.x_labels = ['A', 'B', 'C', 'D']
4242
```
4343

44-
## Speichern
44+
## Save
4545

4646
```python
47-
# SVG (nativ)
47+
# SVG (native)
4848
chart.render_to_file('plot.svg')
4949

50-
# PNG (benötigt cairosvg)
50+
# PNG (requires cairosvg)
5151
chart.render_to_png('plot.png')
5252
```
5353

@@ -79,7 +79,7 @@ chart = pygal.Bar(
7979

8080
`plots/pygal/{chart_type}/`
8181

82-
| Typ | Folder |
82+
| Type | Folder |
8383
|-----|--------|
8484
| `pygal.Bar()` | `bar/` |
8585
| `pygal.Line()` | `line/` |
@@ -90,5 +90,5 @@ chart = pygal.Bar(
9090
## Return Type
9191

9292
```python
93-
def create_plot(...) -> pygal.Bar: # oder entsprechender Typ
93+
def create_plot(...) -> pygal.Bar: # or corresponding type
9494
```

0 commit comments

Comments
 (0)