Skip to content

Commit

Permalink
Merge pull request #2031 from Moonded/locales_types_generator
Browse files Browse the repository at this point in the history
Locales types generator
  • Loading branch information
emmiegit committed Aug 19, 2024
2 parents 3259197 + 0c9e268 commit 731196b
Show file tree
Hide file tree
Showing 9 changed files with 860 additions and 2 deletions.
2 changes: 2 additions & 0 deletions framerail/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pnpm-lock.yaml binary linguist-vendored linguist-generated
src/types/index.ts linguist-generated=true
100 changes: 98 additions & 2 deletions framerail/src/app.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,105 @@
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
// and what to do when importing types

import type { Locales } from "./types"

declare namespace App {
// interface Locals {}
// interface PageData {}
// interface Error {}
interface PageData {
/** Data about the site. */
site: {
site_id: string
[anySite: any]: unknown
}
/** Data about the page itself. */
page: {
page_id: string
page_created_at: string
page_updated_at: string | null
page_deleted_at: string | null
page_revision_count: number
site_id: number
page_category_id: number
page_category_slug: string
discussion_thread_id: number | null
revision_id: number
revision_type: any
revision_created_at: string
revision_number: number
revision_user_id: number
wikitext: string | null
compiled_html: string | null
compiled_at: string
compiled_generator: string
revision_comments: string
hidden_fields: string[]
title: string
alt_title: string | null
slug: string
tags: string[]
rating: any
layout: any
[anyPage: any]: unknown
}
/** Page options as booleans. */
options: {
edit: boolean
title: string | null
parent: string | null
tags: string | null
no_redirect: boolean
no_render: boolean
renderer: boolean
comments: boolean
history: boolean
offset: number | null
data: string
/** @deprecated Use `no_render` instead. */
noRender: boolean
[anyOptions: any]: unknown
}
/** Rendered Wikitext */
wikitext: string
/** Internalization as defined in translation keys for the page. */
internationalization?: Locales
/** Compiled HTML */
compiled_html: string
/** Page revision */
page_revision: {
revision_id: number
revision_type: any
created_at: string
updated_at: string
from_wikidot: boolean
revision_number: number
page_id: number
site_id: number
user_id: number
changes: string[]
wikitext: string | null
compiled_html: string | null
compiled_at: string | null
compiled_generator: string
comments: string
hidden: string[]
title: string | null
alt_title: string | null
sliug: string | null
tags: string[] | null
[anyPageRevision: any]: unknown
}
}

interface Error {
/** Error message */
message: string
/**
* Error internationalization as defined in the translation keys for
* the page. Look at /lib/types.ts for the keys type definitions.
*/
internationalization?: Locales
[anyError: any]: unknown
}
// interface Platform {}
}
127 changes: 127 additions & 0 deletions framerail/src/types/index.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions locales/typed/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm-lock.yaml binary linguist-vendored linguist-generated
130 changes: 130 additions & 0 deletions locales/typed/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
Loading

0 comments on commit 731196b

Please sign in to comment.