@jjlmoya/utils-games-development 1.53.0 → 1.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/category/index.ts +2 -1
- package/src/entries.ts +2 -0
- package/src/index.ts +1 -0
- package/src/tests/locale_completeness.test.ts +2 -2
- package/src/tests/tool_validation.test.ts +2 -2
- package/src/tool/steamBbcodeTranslator/app-client.ts +125 -0
- package/src/tool/steamBbcodeTranslator/bbcode-parser.ts +110 -0
- package/src/tool/steamBbcodeTranslator/bibliography.astro +6 -0
- package/src/tool/steamBbcodeTranslator/bibliography.ts +14 -0
- package/src/tool/steamBbcodeTranslator/component.astro +83 -0
- package/src/tool/steamBbcodeTranslator/entry.ts +28 -0
- package/src/tool/steamBbcodeTranslator/html-parser.ts +42 -0
- package/src/tool/steamBbcodeTranslator/html-renderer.ts +71 -0
- package/src/tool/steamBbcodeTranslator/i18n/de.ts +207 -0
- package/src/tool/steamBbcodeTranslator/i18n/en.ts +236 -0
- package/src/tool/steamBbcodeTranslator/i18n/es.ts +207 -0
- package/src/tool/steamBbcodeTranslator/i18n/fr.ts +195 -0
- package/src/tool/steamBbcodeTranslator/i18n/id.ts +195 -0
- package/src/tool/steamBbcodeTranslator/i18n/it.ts +195 -0
- package/src/tool/steamBbcodeTranslator/i18n/ja.ts +195 -0
- package/src/tool/steamBbcodeTranslator/i18n/ko.ts +195 -0
- package/src/tool/steamBbcodeTranslator/i18n/nl.ts +195 -0
- package/src/tool/steamBbcodeTranslator/i18n/pl.ts +195 -0
- package/src/tool/steamBbcodeTranslator/i18n/pt.ts +195 -0
- package/src/tool/steamBbcodeTranslator/i18n/ru.ts +195 -0
- package/src/tool/steamBbcodeTranslator/i18n/sv.ts +195 -0
- package/src/tool/steamBbcodeTranslator/i18n/tr.ts +195 -0
- package/src/tool/steamBbcodeTranslator/i18n/zh.ts +195 -0
- package/src/tool/steamBbcodeTranslator/index.ts +12 -0
- package/src/tool/steamBbcodeTranslator/logic.test.ts +41 -0
- package/src/tool/steamBbcodeTranslator/logic.ts +96 -0
- package/src/tool/steamBbcodeTranslator/markdown-parser.ts +115 -0
- package/src/tool/steamBbcodeTranslator/markdown-renderer.ts +85 -0
- package/src/tool/steamBbcodeTranslator/seo.astro +15 -0
- package/src/tool/steamBbcodeTranslator/steam-bbcode-translator.css +392 -0
- package/src/tool/steamBbcodeTranslator/storage.ts +30 -0
- package/src/tool/steamBbcodeTranslator/types.ts +36 -0
- package/src/tool/steamBbcodeTranslator/ui.ts +18 -0
- package/src/tools.ts +2 -0
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import type { ToolLocaleContent } from '../../../types';
|
|
2
|
+
import type { SteamBbcodeTranslatorUI } from '../ui';
|
|
3
|
+
import { bibliographyEntries } from '../bibliography';
|
|
4
|
+
|
|
5
|
+
export const content: ToolLocaleContent<SteamBbcodeTranslatorUI> = {
|
|
6
|
+
slug: 'steam-bbcode-omvandlare',
|
|
7
|
+
title: 'Steam BBCode, Markdown och HTML Omvandlare',
|
|
8
|
+
description: 'Konvertera mellan Steam BBCode, Markdown och HTML i båda riktningarna med automatisk syntaxdetektering och live-förhandsgranskning.',
|
|
9
|
+
ui: {
|
|
10
|
+
editorLabel: 'Klistra in din formaterade text',
|
|
11
|
+
editorHint: 'BBCode, Markdown eller HTML identifieras automatiskt medan du skriver.',
|
|
12
|
+
detectedLabel: 'Identifierad',
|
|
13
|
+
detectedEmpty: 'Väntar på text',
|
|
14
|
+
bbcode: 'Steam BBCode',
|
|
15
|
+
markdown: 'Markdown',
|
|
16
|
+
html: 'HTML',
|
|
17
|
+
clear: 'Rensa',
|
|
18
|
+
copy: 'Kopiera resultat',
|
|
19
|
+
copied: 'Kopierat till urklipp',
|
|
20
|
+
characters: 'Tecken',
|
|
21
|
+
blocks: 'Block',
|
|
22
|
+
privacyNote: 'Körs helt i din webbläsare. Inga uppladdningar.',
|
|
23
|
+
persistenceNote: 'Senaste utkastet sparat lokalt',
|
|
24
|
+
previewLabel: 'Förhandsgranskning',
|
|
25
|
+
previewEmpty: 'Din formaterade förhandsgranskning visas här.'
|
|
26
|
+
},
|
|
27
|
+
seo: [
|
|
28
|
+
{
|
|
29
|
+
type: 'title',
|
|
30
|
+
level: 2,
|
|
31
|
+
text: 'Varför butiksbeskrivningar behöver en omvandlare'
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
type: 'paragraph',
|
|
35
|
+
html: 'Steam-butikssidor använder BBCode. Presskit och dokumentation kräver ofta Markdown eller HTML. Detta verktyg konverterar automatiskt mellan de tre formaten.'
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
type: 'title',
|
|
39
|
+
level: 2,
|
|
40
|
+
text: 'Formateringsstöd'
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
type: 'paragraph',
|
|
44
|
+
html: 'Stödjer rubriker, fetstil, kursiv stil, länkar, listor, citat och spoilers.'
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
type: 'stats',
|
|
48
|
+
columns: 4,
|
|
49
|
+
items: [
|
|
50
|
+
{ label: 'Indataformat', value: '3' },
|
|
51
|
+
{ label: 'Utdata per klistra in', value: '2' },
|
|
52
|
+
{ label: 'Listdjup', value: 'Nästlad' },
|
|
53
|
+
{ label: 'Bearbetning', value: 'Endast webbläsare' }
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
type: 'title',
|
|
58
|
+
level: 2,
|
|
59
|
+
text: 'Bevarade nästlade listor'
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
type: 'paragraph',
|
|
63
|
+
html: 'Ett trädträd upprätthåller underlistor i rätt strukturell position.'
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
type: 'table',
|
|
67
|
+
headers: ['Steam BBCode', 'Markdown', 'HTML'],
|
|
68
|
+
rows: [
|
|
69
|
+
['[h1]Titel[/h1]', '# Titel', '<h1>Titel</h1>'],
|
|
70
|
+
['[b]Viktigt[/b]', '**Viktigt**', '<strong>Viktigt</strong>'],
|
|
71
|
+
['[i]Notering[/i]', '*Notering*', '<em>Notering</em>'],
|
|
72
|
+
['[url=https://example.com]Länk[/url]', '[Länk](https://example.com)', '<a href="https://example.com">Länk</a>'],
|
|
73
|
+
['[list][*]Ett[*]Två[/list]', '- Ett\n- Två', '<ul><li>Ett</li><li>Två</li></ul>']
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
type: 'title',
|
|
78
|
+
level: 2,
|
|
79
|
+
text: 'Skillnader mellan Markdown och HTML'
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
type: 'paragraph',
|
|
83
|
+
html: 'När Markdown saknar stöd för understrykning används inline HTML.'
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
type: 'tip',
|
|
87
|
+
title: 'Granskning före publicering',
|
|
88
|
+
html: 'Jämför förhandsgranskningen med ditt originaldokument innan du publicerar på Steam.'
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
type: 'title',
|
|
92
|
+
level: 2,
|
|
93
|
+
text: 'Integritet'
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
type: 'paragraph',
|
|
97
|
+
html: 'All bearbetning sker lokalt i din webbläsare utan att skicka data vidare.'
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
type: 'title',
|
|
101
|
+
level: 2,
|
|
102
|
+
text: 'Begränsningar'
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
type: 'proscons',
|
|
106
|
+
title: 'Att tänka på',
|
|
107
|
+
items: [
|
|
108
|
+
{
|
|
109
|
+
pro: 'Strukturerad listförädling.',
|
|
110
|
+
con: 'Anpassade taggar behöver manuell översyn.'
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
type: 'title',
|
|
116
|
+
level: 2,
|
|
117
|
+
text: 'Ordlista'
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
type: 'glossary',
|
|
121
|
+
items: [
|
|
122
|
+
{
|
|
123
|
+
term: 'BBCode',
|
|
124
|
+
definition: 'Haki-baserad formatering som används på Steam.'
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
term: 'Markdown',
|
|
128
|
+
definition: 'Enkelt och läsbart textformat.'
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
term: 'HTML',
|
|
132
|
+
definition: 'Standardiserat märkspråk för webben.'
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
faqTitle: 'Vanliga frågor',
|
|
138
|
+
faq: [
|
|
139
|
+
{
|
|
140
|
+
question: 'Skickas min text till en server?',
|
|
141
|
+
answer: 'Nej. Konverteringen sker helt i din webbläsare.'
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
question: 'Stöds nästlade listor?',
|
|
145
|
+
answer: 'Ja. Liststrukturen analyseras innan konvertering.'
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
howTo: [
|
|
149
|
+
{
|
|
150
|
+
name: 'Klistra in text',
|
|
151
|
+
text: 'Klistra in Steam BBCode, Markdown eller HTML.'
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: 'Automatisk detektering',
|
|
155
|
+
text: 'De övriga två formaten genereras direkt.'
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
schemas: [
|
|
159
|
+
{
|
|
160
|
+
'@context': 'https://schema.org',
|
|
161
|
+
'@type': 'SoftwareApplication',
|
|
162
|
+
name: 'Steam BBCode, Markdown och HTML Omvandlare',
|
|
163
|
+
applicationCategory: 'DeveloperApplication',
|
|
164
|
+
operatingSystem: 'Any',
|
|
165
|
+
offers: { '@type': 'Offer', price: '0', priceCurrency: 'SEK' }
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
'@context': 'https://schema.org',
|
|
169
|
+
'@type': 'FAQPage',
|
|
170
|
+
mainEntity: [
|
|
171
|
+
{
|
|
172
|
+
'@type': 'Question',
|
|
173
|
+
name: 'Skickas min text till en server?',
|
|
174
|
+
acceptedAnswer: {
|
|
175
|
+
'@type': 'Answer',
|
|
176
|
+
text: 'Nej. Konverteringen sker helt i din webbläsare.'
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
'@context': 'https://schema.org',
|
|
183
|
+
'@type': 'HowTo',
|
|
184
|
+
name: 'Hur man konverterar Steam BBCode, Markdown och HTML',
|
|
185
|
+
step: [
|
|
186
|
+
{
|
|
187
|
+
'@type': 'HowToStep',
|
|
188
|
+
name: 'Klistra in text',
|
|
189
|
+
text: 'Klistra in Steam BBCode, Markdown eller HTML.'
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
}
|
|
193
|
+
],
|
|
194
|
+
bibliography: bibliographyEntries
|
|
195
|
+
};
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import type { ToolLocaleContent } from '../../../types';
|
|
2
|
+
import type { SteamBbcodeTranslatorUI } from '../ui';
|
|
3
|
+
import { bibliographyEntries } from '../bibliography';
|
|
4
|
+
|
|
5
|
+
export const content: ToolLocaleContent<SteamBbcodeTranslatorUI> = {
|
|
6
|
+
slug: 'steam-bbcode-donusturucu',
|
|
7
|
+
title: 'Steam BBCode, Markdown ve HTML Donusturucu',
|
|
8
|
+
description: 'Steam BBCode, Markdown ve HTML formatlari arasinda otomatik sozvarligi tespiti ve canli onizleme ile cift yonlu donusturme yapin.',
|
|
9
|
+
ui: {
|
|
10
|
+
editorLabel: 'Bicimlendirilmis metninizi yapistirin',
|
|
11
|
+
editorHint: 'BBCode, Markdown veya HTML siz yazarken otomatik olarak algilanir.',
|
|
12
|
+
detectedLabel: 'Algilanan',
|
|
13
|
+
detectedEmpty: 'Metin bekleniyor',
|
|
14
|
+
bbcode: 'Steam BBCode',
|
|
15
|
+
markdown: 'Markdown',
|
|
16
|
+
html: 'HTML',
|
|
17
|
+
clear: 'Temizle',
|
|
18
|
+
copy: 'Sonucu kopyala',
|
|
19
|
+
copied: 'Panoya kopyalandi',
|
|
20
|
+
characters: 'Karakterler',
|
|
21
|
+
blocks: 'Bloklar',
|
|
22
|
+
privacyNote: 'Tarayicinizda calisir. Hicbir sey yuklenmez.',
|
|
23
|
+
persistenceNote: 'Son taslak yerel olarak kaydedildi',
|
|
24
|
+
previewLabel: 'Onizleme',
|
|
25
|
+
previewEmpty: 'Bicimlendirilmis onizlemeniz burada gorunur.'
|
|
26
|
+
},
|
|
27
|
+
seo: [
|
|
28
|
+
{
|
|
29
|
+
type: 'title',
|
|
30
|
+
level: 2,
|
|
31
|
+
text: 'Magaza aciklamalari neden donusturucuye ihtiyac duyar'
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
type: 'paragraph',
|
|
35
|
+
html: 'Steam magaza aciklamalari BBCode kullanir. Basin kitleri veya dokuman siteleri Markdown veya HTML gerektirir. Bu arac formatlar arasinda otomatik donusum saglar.'
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
type: 'title',
|
|
39
|
+
level: 2,
|
|
40
|
+
text: 'Desteklenen etiketler'
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
type: 'paragraph',
|
|
44
|
+
html: 'Basliklar, kalin, italik, baglantilar, listeler, alintilar ve spoiler etiketleri desteklenir.'
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
type: 'stats',
|
|
48
|
+
columns: 4,
|
|
49
|
+
items: [
|
|
50
|
+
{ label: 'Girdi formati', value: '3' },
|
|
51
|
+
{ label: 'Cikti formati', value: '2' },
|
|
52
|
+
{ label: 'Liste derinligi', value: 'Ic ice' },
|
|
53
|
+
{ label: 'Islem', value: 'Sadece tarayici' }
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
type: 'title',
|
|
58
|
+
level: 2,
|
|
59
|
+
text: 'Ic ice listelerin korunmasi'
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
type: 'paragraph',
|
|
63
|
+
html: 'Hiyerarsik yapi agaci alt listelerin ana oge icinde kalmasini saglar.'
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
type: 'table',
|
|
67
|
+
headers: ['Steam BBCode', 'Markdown', 'HTML'],
|
|
68
|
+
rows: [
|
|
69
|
+
['[h1]Baslik[/h1]', '# Baslik', '<h1>Baslik</h1>'],
|
|
70
|
+
['[b]Onemli[/b]', '**Onemli**', '<strong>Onemli</strong>'],
|
|
71
|
+
['[i]Not[/i]', '*Not*', '<em>Not</em>'],
|
|
72
|
+
['[url=https://example.com]Baglanti[/url]', '[Baglanti](https://example.com)', '<a href="https://example.com">Baglanti</a>'],
|
|
73
|
+
['[list][*]Bir[*]Iki[/list]', '- Bir\n- Iki', '<ul><li>Bir</li><li>Iki</li></ul>']
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
type: 'title',
|
|
78
|
+
level: 2,
|
|
79
|
+
text: 'Markdown ve HTML farkliliklari'
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
type: 'paragraph',
|
|
83
|
+
html: 'Markdown alti cizili metni yerel olarak desteklemediginde HTML etiketleri kullanilir.'
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
type: 'tip',
|
|
87
|
+
title: 'Yayinlama oncesi kontrol',
|
|
88
|
+
html: 'Yayinlamadan once onizleme ekranindaki ciktilari kaynak belgenizle karsilastirin.'
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
type: 'title',
|
|
92
|
+
level: 2,
|
|
93
|
+
text: 'Veri gizliligi'
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
type: 'paragraph',
|
|
97
|
+
html: 'Tum islemler tamamen yerel olarak tarayicinizda gerceklesir.'
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
type: 'title',
|
|
101
|
+
level: 2,
|
|
102
|
+
text: 'Sinirlamalar'
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
type: 'proscons',
|
|
106
|
+
title: 'Dikkat edilecekler',
|
|
107
|
+
items: [
|
|
108
|
+
{
|
|
109
|
+
pro: 'Liste yapisi korunur.',
|
|
110
|
+
con: 'Ozel etiketler manuel kontrol gerektirebilir.'
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
type: 'title',
|
|
116
|
+
level: 2,
|
|
117
|
+
text: 'Terimler sozlugu'
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
type: 'glossary',
|
|
121
|
+
items: [
|
|
122
|
+
{
|
|
123
|
+
term: 'BBCode',
|
|
124
|
+
definition: 'Steam tarafindan kullanilan kosebenti etiket yapisi.'
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
term: 'Markdown',
|
|
128
|
+
definition: 'Kolay okunabilir duz metin bicimlendirme dili.'
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
term: 'HTML',
|
|
132
|
+
definition: 'Web sayfalari icin standart isaretleme dili.'
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
faqTitle: 'Sikca sorulan sorular',
|
|
138
|
+
faq: [
|
|
139
|
+
{
|
|
140
|
+
question: 'Metnim bir sunucuya gonderiliyor mu?',
|
|
141
|
+
answer: 'Hayir. Donusum tamamen tarayicinizda gerceklesir.'
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
question: 'Ic ice listeler destekleniyor mu?',
|
|
145
|
+
answer: 'Evet. Liste yapisi donusumden once cozümlenir.'
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
howTo: [
|
|
149
|
+
{
|
|
150
|
+
name: 'Metni yapistirin',
|
|
151
|
+
text: 'Steam BBCode, Markdown veya HTML yapistirin.'
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: 'Otomatik donusum',
|
|
155
|
+
text: 'Diger iki format aninda olusturulur.'
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
schemas: [
|
|
159
|
+
{
|
|
160
|
+
'@context': 'https://schema.org',
|
|
161
|
+
'@type': 'SoftwareApplication',
|
|
162
|
+
name: 'Steam BBCode, Markdown ve HTML Donusturucu',
|
|
163
|
+
applicationCategory: 'DeveloperApplication',
|
|
164
|
+
operatingSystem: 'Any',
|
|
165
|
+
offers: { '@type': 'Offer', price: '0', priceCurrency: 'TRY' }
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
'@context': 'https://schema.org',
|
|
169
|
+
'@type': 'FAQPage',
|
|
170
|
+
mainEntity: [
|
|
171
|
+
{
|
|
172
|
+
'@type': 'Question',
|
|
173
|
+
name: 'Metnim bir sunucuya gonderiliyor mu?',
|
|
174
|
+
acceptedAnswer: {
|
|
175
|
+
'@type': 'Answer',
|
|
176
|
+
text: 'Hayir. Donusum tamamen tarayicinizda gerceklesir.'
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
'@context': 'https://schema.org',
|
|
183
|
+
'@type': 'HowTo',
|
|
184
|
+
name: 'Steam BBCode, Markdown ve HTML nasil donusturulur',
|
|
185
|
+
step: [
|
|
186
|
+
{
|
|
187
|
+
'@type': 'HowToStep',
|
|
188
|
+
name: 'Metni yapistirin',
|
|
189
|
+
text: 'Steam BBCode, Markdown veya HTML yapistirin.'
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
}
|
|
193
|
+
],
|
|
194
|
+
bibliography: bibliographyEntries
|
|
195
|
+
};
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import type { ToolLocaleContent } from '../../../types';
|
|
2
|
+
import type { SteamBbcodeTranslatorUI } from '../ui';
|
|
3
|
+
import { bibliographyEntries } from '../bibliography';
|
|
4
|
+
|
|
5
|
+
export const content: ToolLocaleContent<SteamBbcodeTranslatorUI> = {
|
|
6
|
+
slug: 'steam-bbcode-translator',
|
|
7
|
+
title: 'Steam BBCode, Markdown 与 HTML 转换器',
|
|
8
|
+
description: '支持 Steam BBCode、Markdown 和 HTML 之间的双向自动识别转换与实时预览。',
|
|
9
|
+
ui: {
|
|
10
|
+
editorLabel: '粘贴您的富文本',
|
|
11
|
+
editorHint: '输入时将自动识别 BBCode、Markdown 或 HTML 格式。',
|
|
12
|
+
detectedLabel: '识别格式',
|
|
13
|
+
detectedEmpty: '等待输入文本',
|
|
14
|
+
bbcode: 'Steam BBCode',
|
|
15
|
+
markdown: 'Markdown',
|
|
16
|
+
html: 'HTML',
|
|
17
|
+
clear: '清空',
|
|
18
|
+
copy: '复制输出',
|
|
19
|
+
copied: '已复制到剪贴板',
|
|
20
|
+
characters: '字符数',
|
|
21
|
+
blocks: '区块数',
|
|
22
|
+
privacyNote: '在浏览器中本地运行,无需上传。',
|
|
23
|
+
persistenceNote: '最后草稿已保存在本地',
|
|
24
|
+
previewLabel: '预览',
|
|
25
|
+
previewEmpty: '格式化后的预览将在此显示。'
|
|
26
|
+
},
|
|
27
|
+
seo: [
|
|
28
|
+
{
|
|
29
|
+
type: 'title',
|
|
30
|
+
level: 2,
|
|
31
|
+
text: '为什么商店文案需要格式转换器'
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
type: 'paragraph',
|
|
35
|
+
html: 'Steam 商店页面编辑使用 BBCode 语法,而新闻资料包或文档网站通常使用 Markdown 或 HTML。本工具能够自动识别并同步生成其他两种格式。'
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
type: 'title',
|
|
39
|
+
level: 2,
|
|
40
|
+
text: '支持的标记与结构'
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
type: 'paragraph',
|
|
44
|
+
html: '支持标题、加粗、斜体、链接、列表、引用与黑幕剧透标记的转换。'
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
type: 'stats',
|
|
48
|
+
columns: 4,
|
|
49
|
+
items: [
|
|
50
|
+
{ label: '输入格式', value: '3 种' },
|
|
51
|
+
{ label: '同时输出', value: '2 种' },
|
|
52
|
+
{ label: '列表深度', value: '支持嵌套' },
|
|
53
|
+
{ label: '数据处理', value: '纯本地' }
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
type: 'title',
|
|
58
|
+
level: 2,
|
|
59
|
+
text: '保留嵌套列表结构'
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
type: 'paragraph',
|
|
63
|
+
html: '通过构建轻量级语法树,确保子列表项在转换后依然精确嵌套在父级列表中。'
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
type: 'table',
|
|
67
|
+
headers: ['Steam BBCode', 'Markdown', 'HTML'],
|
|
68
|
+
rows: [
|
|
69
|
+
['[h1]标题[/h1]', '# 标题', '<h1>标题</h1>'],
|
|
70
|
+
['[b]重点[/b]', '**重点**', '<strong>重点</strong>'],
|
|
71
|
+
['[i]备注[/i]', '*备注*', '<em>备注</em>'],
|
|
72
|
+
['[url=https://example.com]链接[/url]', '[链接](https://example.com)', '<a href="https://example.com">链接</a>'],
|
|
73
|
+
['[list][*]第一[*]第二[/list]', '- 第一\n- 第二', '<ul><li>第一</li><li>第二</li></ul>']
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
type: 'title',
|
|
78
|
+
level: 2,
|
|
79
|
+
text: 'Markdown 与 HTML 转换差异'
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
type: 'paragraph',
|
|
83
|
+
html: '当 Markdown 原生不支持下划线等样式时,转换器会自动补充内联 HTML 标签。'
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
type: 'tip',
|
|
87
|
+
title: '发布前检查建议',
|
|
88
|
+
html: '在发布到 Steam 或官网之前,请在预览面板中核对排版效果。'
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
type: 'title',
|
|
92
|
+
level: 2,
|
|
93
|
+
text: '隐私与数据安全'
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
type: 'paragraph',
|
|
97
|
+
html: '所有转换均在您的浏览器本地完成,绝不会上传任何未公开文案。'
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
type: 'title',
|
|
101
|
+
level: 2,
|
|
102
|
+
text: '转换说明'
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
type: 'proscons',
|
|
106
|
+
title: '转换特点',
|
|
107
|
+
items: [
|
|
108
|
+
{
|
|
109
|
+
pro: '结构化处理嵌套列表。',
|
|
110
|
+
con: '自定义非标标签需手动复核。'
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
type: 'title',
|
|
116
|
+
level: 2,
|
|
117
|
+
text: '术语表'
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
type: 'glossary',
|
|
121
|
+
items: [
|
|
122
|
+
{
|
|
123
|
+
term: 'BBCode',
|
|
124
|
+
definition: 'Steam 商店页面使用的方括号标记语法。'
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
term: 'Markdown',
|
|
128
|
+
definition: '易读易写的轻量级标记语言。'
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
term: 'HTML',
|
|
132
|
+
definition: '网页标准的超文本标记语言。'
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
faqTitle: '常见问题解答',
|
|
138
|
+
faq: [
|
|
139
|
+
{
|
|
140
|
+
question: '文本会被上传到服务器吗?',
|
|
141
|
+
answer: '不会。转换完全在您的浏览器本地进行。'
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
question: '支持嵌套列表吗?',
|
|
145
|
+
answer: '支持。系统会先解析列表语法树再生成目标格式。'
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
howTo: [
|
|
149
|
+
{
|
|
150
|
+
name: '粘贴文本',
|
|
151
|
+
text: '粘贴 Steam BBCode、Markdown 或 HTML 文本。'
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: '自动转换',
|
|
155
|
+
text: '系统将自动生成另外两种格式。'
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
schemas: [
|
|
159
|
+
{
|
|
160
|
+
'@context': 'https://schema.org',
|
|
161
|
+
'@type': 'SoftwareApplication',
|
|
162
|
+
name: 'Steam BBCode, Markdown 与 HTML 转换器',
|
|
163
|
+
applicationCategory: 'DeveloperApplication',
|
|
164
|
+
operatingSystem: 'Any',
|
|
165
|
+
offers: { '@type': 'Offer', price: '0', priceCurrency: 'CNY' }
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
'@context': 'https://schema.org',
|
|
169
|
+
'@type': 'FAQPage',
|
|
170
|
+
mainEntity: [
|
|
171
|
+
{
|
|
172
|
+
'@type': 'Question',
|
|
173
|
+
name: '文本会被上传到服务器吗?',
|
|
174
|
+
acceptedAnswer: {
|
|
175
|
+
'@type': 'Answer',
|
|
176
|
+
text: 'จะไม่。转换完全在您的浏览器本地进行。'
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
'@context': 'https://schema.org',
|
|
183
|
+
'@type': 'HowTo',
|
|
184
|
+
name: '如何转换 Steam BBCode、Markdown 与 HTML',
|
|
185
|
+
step: [
|
|
186
|
+
{
|
|
187
|
+
'@type': 'HowToStep',
|
|
188
|
+
name: '粘贴文本',
|
|
189
|
+
text: '粘贴 Steam BBCode、Markdown 或 HTML 文本。'
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
}
|
|
193
|
+
],
|
|
194
|
+
bibliography: bibliographyEntries
|
|
195
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ToolDefinition } from '../../types';
|
|
2
|
+
import { steamBbcodeTranslator } from './entry';
|
|
3
|
+
|
|
4
|
+
export * from './entry';
|
|
5
|
+
export * from './logic';
|
|
6
|
+
|
|
7
|
+
export const STEAM_BBCODE_TRANSLATOR_TOOL: ToolDefinition = {
|
|
8
|
+
entry: steamBbcodeTranslator,
|
|
9
|
+
Component: () => import('./component.astro'),
|
|
10
|
+
SEOComponent: () => import('./seo.astro'),
|
|
11
|
+
BibliographyComponent: () => import('./bibliography.astro'),
|
|
12
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { detectSyntax, getPreviewHtml, markdownToBbcode, sampleBbcode, translate, translateToAll } from './logic';
|
|
3
|
+
|
|
4
|
+
describe('steam BBCode translator', () => {
|
|
5
|
+
it('converts headings, inline emphasis and links to Markdown', () => {
|
|
6
|
+
const result = translate('[h1]Signal Lost[/h1]\n[b]Bold[/b] [url=https://example.com]Read[/url]', 'bbcode-to-output', 'markdown');
|
|
7
|
+
expect(result.output).toContain('# Signal Lost');
|
|
8
|
+
expect(result.output).toContain('**Bold**');
|
|
9
|
+
expect(result.output).toContain('[Read](https://example.com)');
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('keeps nested BBCode lists nested in Markdown and HTML', () => {
|
|
13
|
+
const markdown = translate('[list][*]Parent[list][*]Child[/list][*]Sibling[/list]', 'bbcode-to-output', 'markdown');
|
|
14
|
+
const html = translate('[list][*]Parent[list][*]Child[/list][*]Sibling[/list]', 'bbcode-to-output', 'html');
|
|
15
|
+
expect(markdown.output).toContain('- Parent\n - Child');
|
|
16
|
+
expect(html.output).toContain('<ul><li>Parent<ul><li>Child</li></ul></li><li>Sibling</li></ul>');
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it('translates Markdown list indentation back to Steam list tags', () => {
|
|
20
|
+
const result = markdownToBbcode('- Parent\n - Child\n- Sibling');
|
|
21
|
+
expect(result.output).toBe('[list]\n[*]Parent\n[list]\n[*]Child\n[/list]\n[*]Sibling\n[/list]');
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it('handles empty input and exposes a safe preview', () => {
|
|
25
|
+
expect(translate(' ', 'bbcode-to-output', 'html').stats.characters).toBe(0);
|
|
26
|
+
expect(getPreviewHtml(sampleBbcode, 'bbcode-to-output', 'html')).not.toContain('<script');
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it('detects the pasted syntax and returns only the other two formats', () => {
|
|
30
|
+
expect(detectSyntax('[b]Steam[/b]')).toBe('bbcode');
|
|
31
|
+
expect(detectSyntax('# Markdown')).toBe('markdown');
|
|
32
|
+
expect(detectSyntax('<strong>HTML</strong>')).toBe('html');
|
|
33
|
+
expect(Object.keys(translateToAll(sampleBbcode).outputs).sort()).toEqual(['html', 'markdown']);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it('reports malformed closing tags without throwing', () => {
|
|
37
|
+
const result = translate('[b]Unfinished[/i]', 'bbcode-to-output', 'markdown');
|
|
38
|
+
expect(result.output).toContain('Unfinished');
|
|
39
|
+
expect(result.warnings.length).toBeGreaterThan(0);
|
|
40
|
+
});
|
|
41
|
+
});
|