Skip to content

Commit b035014

Browse files
committed
Fixed english translation for placeholder plugin and use more modern translation system
1 parent 746aa53 commit b035014

File tree

3 files changed

+88
-10
lines changed

3 files changed

+88
-10
lines changed

assets/ckeditor/plugins/PartDBLabel/PartDBLabelUI.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import {Plugin} from 'ckeditor5';
2121

2222
require('./lang/de.js');
23+
require('./lang/en.js');
2324

2425
import { addListToDropdown, createDropdown } from 'ckeditor5';
2526

assets/ckeditor/plugins/PartDBLabel/lang/de.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,9 @@
1717
* along with this program. If not, see <https://www.gnu.org/licenses/>.
1818
*/
1919

20-
// Make sure that the global object is defined. If not, define it.
21-
window.CKEDITOR_TRANSLATIONS = window.CKEDITOR_TRANSLATIONS || {};
20+
import {add} from "ckeditor5";
2221

23-
// Make sure that the dictionary for Polish translations exist.
24-
window.CKEDITOR_TRANSLATIONS[ 'de' ] = window.CKEDITOR_TRANSLATIONS[ 'de' ] || {};
25-
window.CKEDITOR_TRANSLATIONS[ 'de' ].dictionary = window.CKEDITOR_TRANSLATIONS[ 'de' ].dictionary || {};
26-
27-
// Extend the dictionary for Polish translations with your translations:
28-
Object.assign( window.CKEDITOR_TRANSLATIONS[ 'de' ].dictionary, {
22+
add( "de", {
2923
'Label Placeholder': 'Label Platzhalter',
3024
'Part': 'Bauteil',
3125

@@ -88,5 +82,4 @@ Object.assign( window.CKEDITOR_TRANSLATIONS[ 'de' ].dictionary, {
8882
'Instance name': 'Instanzname',
8983
'Target type': 'Zieltyp',
9084
'URL of this Part-DB instance': 'URL dieser Part-DB Instanz',
91-
92-
} );
85+
});
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
/*
2+
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
3+
*
4+
* Copyright (C) 2019 - 2025 Jan Böhmer (https://github.com/jbtronics)
5+
*
6+
* This program is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU Affero General Public License as published
8+
* by the Free Software Foundation, either version 3 of the License, or
9+
* (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU Affero General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Affero General Public License
17+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
18+
*/
19+
20+
import {add} from "ckeditor5";
21+
22+
add( "en", {
23+
'Label Placeholder': 'Label placeholder',
24+
'Part': 'Part',
25+
26+
'Database ID': 'Database ID',
27+
'Part name': 'Part name',
28+
'Category': 'Category',
29+
'Category (Full path)': 'Category (full path)',
30+
'Manufacturer': 'Manufacturer',
31+
'Manufacturer (Full path)': 'Manufacturer (full path)',
32+
'Footprint': 'Footprint',
33+
'Footprint (Full path)': 'Footprint (full path)',
34+
'Mass': 'Mass',
35+
'Manufacturer Product Number (MPN)': 'Manufacturer Product Number (MPN)',
36+
'Internal Part Number (IPN)': 'Internal Part Number (IPN)',
37+
'Tags': 'Tags',
38+
'Manufacturing status': 'Manufacturing status',
39+
'Description': 'Description',
40+
'Description (plain text)': 'Description (plain text)',
41+
'Comment': 'Comment',
42+
'Comment (plain text)': 'Comment (plain text)',
43+
'Last modified datetime': 'Last modified datetime',
44+
'Creation datetime': 'Creation datetime',
45+
'IPN as QR code': 'IPN as QR code',
46+
'IPN as Code 128 barcode': 'IPN as Code 128 barcode',
47+
'IPN as Code 39 barcode': 'IPN as Code 39 barcode',
48+
49+
'Lot ID': 'Lot ID',
50+
'Lot name': 'Lot name',
51+
'Lot comment': 'Lot comment',
52+
'Lot expiration date': 'Lot expiration date',
53+
'Lot amount': 'Lot amount',
54+
'Storage location': 'Storage location',
55+
'Storage location (Full path)': 'Storage location (full path)',
56+
'Full name of the lot owner': 'Full name of the lot owner',
57+
'Username of the lot owner': 'Username of the lot owner',
58+
59+
'Barcodes': 'Barcodes',
60+
'Content of the 1D barcodes (like Code 39)': 'Content of the 1D barcodes (like Code 39)',
61+
'Content of the 2D barcodes (QR codes)': 'Content of the 2D barcodes (QR codes)',
62+
'QR code linking to this element': 'QR code linking to this element',
63+
'Code 128 barcode linking to this element': 'Code 128 barcode linking to this element',
64+
'Code 39 barcode linking to this element': 'Code 39 barcode linking to this element',
65+
'Code 93 barcode linking to this element': 'Code 93 barcode linking to this element',
66+
'Datamatrix code linking to this element': 'Datamatrix code linking to this element',
67+
68+
'Location ID': 'Location ID',
69+
'Name': 'Name',
70+
'Full path': 'Full path',
71+
'Parent name': 'Parent name',
72+
'Parent full path': 'Parent full path',
73+
'Full name of the location owner': 'Full name of the location owner',
74+
'Username of the location owner': 'Username of the location owner',
75+
76+
'Username': 'Username',
77+
'Username (including name)': 'Username (including name)',
78+
'Current datetime': 'Current datetime',
79+
'Current date': 'Current date',
80+
'Current time': 'Current time',
81+
'Instance name': 'Instance name',
82+
'Target type': 'Target type',
83+
'URL of this Part-DB instance': 'URL of this Part-DB instance',
84+
} );

0 commit comments

Comments
 (0)