Skip to content

Commit 5813baf

Browse files
authored
Merge pull request #80 from kyco/develop
Develop
2 parents b3a819f + e6839cb commit 5813baf

18 files changed

Lines changed: 89 additions & 47 deletions

demo/src/components/TermLinks.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { TTermLinks } from 'dev-dict'
2-
import { ExternalLink, Globe } from 'lucide-react'
2+
import { ExternalLink } from 'lucide-react'
33
import { Fragment } from 'react'
44

55
interface TermLinksProps {
@@ -10,7 +10,7 @@ interface TermLinksProps {
1010
}
1111

1212
const linkData = [
13-
{ key: 'official_website' as const, label: 'Official Website', icon: Globe },
13+
{ key: 'official_website' as const, label: 'Official Website', icon: ExternalLink },
1414
{ key: 'wikipedia' as const, label: 'Wikipedia', icon: ExternalLink },
1515
{ key: 'github' as const, label: 'GitHub', icon: ExternalLink },
1616
{ key: 'npm' as const, label: 'npm', icon: ExternalLink },
@@ -34,8 +34,8 @@ export function TermLinks({ links, variant = 'button', onLinkClick, showEmpty =
3434
rel="noopener noreferrer"
3535
className="inline-flex items-center gap-1.5 px-3 py-1.5 text-sm text-slate-600 hover:text-blue-600 bg-slate-50 hover:bg-blue-50 rounded-lg border border-slate-200 hover:border-blue-200 transition-colors"
3636
>
37-
<Icon size={14} />
3837
{label}
38+
<Icon size={14} />
3939
</a>
4040
))}
4141
</div>
@@ -57,8 +57,8 @@ export function TermLinks({ links, variant = 'button', onLinkClick, showEmpty =
5757
}}
5858
className="inline-flex items-center gap-1 hover:text-blue-500 transition-colors cursor-pointer bg-transparent border-0 p-0 font-inherit"
5959
>
60-
<Icon size={10} />
6160
{label}
61+
<Icon size={10} />
6262
</button>
6363
</Fragment>
6464
))}

demo/src/pages/TermPage.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,11 @@ export function TermPage({ termId, fromQuery }: TermPageProps) {
195195
<TermLinks links={term.links} variant="button" showEmpty />
196196
</div>
197197

198-
{term.sources && (term.sources.label?.length || term.sources.definition?.length) && (
198+
{term.sources && (term.sources.label?.length || term.sources.definition?.length) ? (
199199
<div className="pt-6 border-t border-slate-200">
200200
<h2 className="text-sm font-semibold text-slate-400 uppercase tracking-wider mb-3">Sources</h2>
201201
<div className="text-sm text-slate-500 space-y-1">
202-
{term.sources.label && term.sources.label.length > 0 && (
202+
{term.sources.label && term.sources.label.length ? (
203203
<p>
204204
<span className="text-slate-400">Label:</span>{' '}
205205
{term.sources.label
@@ -208,8 +208,8 @@ export function TermPage({ termId, fromQuery }: TermPageProps) {
208208
)
209209
.join(', ')}
210210
</p>
211-
)}
212-
{term.sources.definition && term.sources.definition.length > 0 && (
211+
) : null}
212+
{term.sources.definition && term.sources.definition.length ? (
213213
<p>
214214
<span className="text-slate-400">Definition:</span>{' '}
215215
{term.sources.definition
@@ -218,10 +218,10 @@ export function TermPage({ termId, fromQuery }: TermPageProps) {
218218
)
219219
.join(', ')}
220220
</p>
221-
)}
221+
) : null}
222222
</div>
223223
</div>
224-
)}
224+
) : null}
225225

226226
<div className="pt-8 mt-6 border-t border-slate-200">
227227
<div className="flex items-center justify-between gap-6">

demo/src/shared/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const LANGUAGES = [
99
export const FILTER_OPTIONS = [
1010
{ id: 'all', label: 'All terms' },
1111
{ id: 'baseline_incomplete', label: 'Needs work' },
12-
{ id: 'baseline_complete', label: 'Ready' },
12+
// { id: 'baseline_complete', label: 'Ready' },
1313
{ id: 'fully_complete', label: 'Fully translated' },
1414
]
1515

src/data/terms/golang.ts

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,39 @@ export default {
99

1010
name: {
1111
[LOCALES.EN_US]: `Go`,
12+
[LOCALES.EN_GB]: LOCALES.EN_US,
13+
[LOCALES.DE_DE]: LOCALES.EN_US,
14+
},
15+
16+
altName: {
17+
[LOCALES.EN_US]: `Golang`,
18+
[LOCALES.EN_GB]: LOCALES.EN_US,
19+
[LOCALES.DE_DE]: LOCALES.EN_US,
1220
},
1321

1422
label: {
15-
[LOCALES.EN_US]: ``,
23+
[LOCALES.EN_US]: `High-Level Programming Language`,
24+
[LOCALES.EN_GB]: LOCALES.EN_US,
25+
[LOCALES.DE_DE]: `Hochsprache`,
1626
},
1727

1828
definition: {
19-
[LOCALES.EN_US]: ``,
29+
[LOCALES.EN_US]: `Go, also known as Golang, is a statically typed, compiled programming language designed at Google. It emphasizes simplicity, concurrency, and performance, making it ideal for building scalable and efficient software applications.`,
30+
[LOCALES.EN_GB]: LOCALES.EN_US,
31+
[LOCALES.DE_DE]: `Go, auch bekannt als Golang, ist eine statisch typisierte, kompilierte Programmiersprache, die bei Google entwickelt wurde. Sie legt Wert auf Einfachheit, Nebenläufigkeit und Leistung, was sie ideal für den Aufbau skalierbarer und effizienter Softwareanwendungen macht.`,
2032
},
2133

2234
type: [TYPES.language],
2335

24-
tags: [],
36+
tags: [TAGS.backend, TAGS.open_source],
37+
38+
links: {
39+
official_website: `https://go.dev/`,
40+
wikipedia: `https://en.wikipedia.org/wiki/Go_(programming_language)`,
41+
},
42+
43+
sources: {
44+
label: [SOURCES.ai_generated],
45+
definition: [SOURCES.ai_generated],
46+
},
2547
} as const satisfies TTerm

src/data/terms/javascript.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,20 @@ export default {
99

1010
name: {
1111
[LOCALES.EN_US]: `JavaScript`,
12+
[LOCALES.EN_GB]: LOCALES.EN_US,
13+
[LOCALES.DE_DE]: LOCALES.EN_US,
1214
},
1315

1416
label: {
1517
[LOCALES.EN_US]: `High-Level Programming Language`,
18+
[LOCALES.EN_GB]: LOCALES.EN_US,
1619
[LOCALES.DE_DE]: `Hochsprache`,
1720
},
1821

1922
definition: {
20-
[LOCALES.EN_US]: ``,
23+
[LOCALES.EN_US]: `JavaScript is a high-level, dynamically typed programming language and one of the three core technologies of the Web alongside HTML and CSS. Created by Brendan Eich in 1995, it runs in browsers for client-side scripting and on servers via runtimes like Node.js.`,
24+
[LOCALES.EN_GB]: LOCALES.EN_US,
25+
[LOCALES.DE_DE]: `JavaScript ist eine hochsprachige, dynamisch typisierte Programmiersprache und eine der drei Kerntechnologien des Webs neben HTML und CSS. Sie wurde 1995 von Brendan Eich entwickelt und läuft in Browsern für clientseitiges Scripting sowie auf Servern über Laufzeitumgebungen wie Node.js.`,
2126
},
2227

2328
type: [TYPES.language],
@@ -28,4 +33,9 @@ export default {
2833
official_website: 'https://tc39.es/ecma262',
2934
wikipedia: `https://en.wikipedia.org/wiki/JavaScript`,
3035
},
36+
37+
sources: {
38+
label: [SOURCES.ai_generated],
39+
definition: [SOURCES.ai_generated],
40+
},
3141
} as const satisfies TTerm

src/data/terms/postgres.ts

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,39 @@ export default {
99

1010
name: {
1111
[LOCALES.EN_US]: `PostgreSQL`,
12+
[LOCALES.EN_GB]: LOCALES.EN_US,
13+
[LOCALES.DE_DE]: LOCALES.EN_US,
14+
},
15+
16+
altName: {
17+
[LOCALES.EN_US]: `Postgres`,
18+
[LOCALES.EN_GB]: LOCALES.EN_US,
19+
[LOCALES.DE_DE]: LOCALES.EN_US,
1220
},
1321

1422
label: {
15-
[LOCALES.EN_US]: ``,
23+
[LOCALES.EN_US]: `Relational Database Management System`,
24+
[LOCALES.EN_GB]: LOCALES.EN_US,
25+
[LOCALES.DE_DE]: `Relationales Datenbankverwaltungssystem`,
1626
},
1727

1828
definition: {
19-
[LOCALES.EN_US]: ``,
29+
[LOCALES.EN_US]: `PostgreSQL, often referred to as Postgres, is a powerful, open-source relational database management system (RDBMS) that emphasizes extensibility and SQL compliance. It supports advanced data types, complex queries, and a wide range of programming languages, making it a popular choice for developers and enterprises worldwide.`,
30+
[LOCALES.EN_GB]: LOCALES.EN_US,
31+
[LOCALES.DE_DE]: `PostgreSQL, oft als Postgres bezeichnet, ist ein leistungsstarkes, Open-Source relationales Datenbankverwaltungssystem (RDBMS), das Wert auf Erweiterbarkeit und SQL-Konformität legt. Es unterstützt erweiterte Datentypen, komplexe Abfragen und eine breite Palette von Programmiersprachen, was es zu einer beliebten Wahl für Entwickler und Unternehmen weltweit macht.`,
2032
},
2133

22-
type: [],
34+
type: [TYPES.database],
35+
36+
tags: [TAGS.backend, TAGS.open_source],
2337

24-
tags: [],
38+
links: {
39+
official_website: `https://www.postgresql.org/`,
40+
wikipedia: `https://en.wikipedia.org/wiki/PostgreSQL`,
41+
},
42+
43+
sources: {
44+
label: [SOURCES.ai_generated],
45+
definition: [SOURCES.ai_generated],
46+
},
2547
} as const satisfies TTerm

src/data/types/cms.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import type { TTermType } from '@/types'
22
import { LOCALES } from '@/data/locales'
3-
import { SOURCES } from '@/data/sources'
4-
import { TAGS } from '@/data/tags'
5-
import { TYPES } from '@/data/types'
63

74
export default {
85
id: `cms`,

src/data/types/concept.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import type { TTermType } from '@/types'
22
import { LOCALES } from '@/data/locales'
3-
import { SOURCES } from '@/data/sources'
4-
import { TAGS } from '@/data/tags'
5-
import { TYPES } from '@/data/types'
63

74
export default {
85
id: `concept`,

src/data/types/database.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import type { TTermType } from '@/types'
2+
import { LOCALES } from '@/data/locales'
3+
4+
export default {
5+
id: `database`,
6+
7+
name: {
8+
[LOCALES.EN_US]: `Database`,
9+
[LOCALES.EN_GB]: LOCALES.EN_US,
10+
[LOCALES.DE_DE]: `Datenbank`,
11+
},
12+
} as const satisfies TTermType

src/data/types/framework.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import type { TTermType } from '@/types'
22
import { LOCALES } from '@/data/locales'
3-
import { SOURCES } from '@/data/sources'
4-
import { TAGS } from '@/data/tags'
5-
import { TYPES } from '@/data/types'
63

74
export default {
85
id: `framework`,

0 commit comments

Comments
 (0)