mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-23 20:54:48 -04:00
change(rewrite): Small changes in rewrite
history-generator: The `historyDefaultsToWeirdGeneratorThing` has been renamed to `isUserGenerated`, and the expression for setting `history` to `__generator__` has been changed. See https://gitlab.com/PronounsPage/PronounsPage/-/merge_requests/373#note_1577573480. cleaning: Formatted a few files and cleaned them up.
This commit is contained in:
parent
679f11633f
commit
581d6e7da3
@ -24,7 +24,7 @@ export interface Config {
|
||||
};
|
||||
database: {
|
||||
url: string;
|
||||
}
|
||||
};
|
||||
security: {
|
||||
secret: string;
|
||||
};
|
||||
|
2
new/backend/src/global.d.ts
vendored
2
new/backend/src/global.d.ts
vendored
@ -1,9 +1,7 @@
|
||||
import type {
|
||||
FastifyInstance,
|
||||
FastifyPluginAsync,
|
||||
// FastifyPluginCallback,
|
||||
FastifyPluginOptions,
|
||||
FastifyRequest,
|
||||
FastifyReply,
|
||||
RawReplyDefaultExpression,
|
||||
RawRequestDefaultExpression,
|
||||
|
@ -60,8 +60,7 @@ export const localeSpecific = Type.Object({
|
||||
|
||||
export interface TransformPronounOptions {
|
||||
processName: boolean;
|
||||
// I know it's a long name but it's very descriptive.
|
||||
historyDefaultsToWeirdGeneratorThing: boolean;
|
||||
isUserGenerated: boolean;
|
||||
}
|
||||
export function transformPronoun(
|
||||
pronoun: Pronoun,
|
||||
@ -71,8 +70,7 @@ export function transformPronoun(
|
||||
) {
|
||||
const opts: TransformPronounOptions = {
|
||||
processName: options?.processName ?? false,
|
||||
historyDefaultsToWeirdGeneratorThing:
|
||||
options?.historyDefaultsToWeirdGeneratorThing ?? false,
|
||||
isUserGenerated: options?.isUserGenerated ?? false,
|
||||
};
|
||||
const morphemes: Record<string, string> = {};
|
||||
const pronunciations: Record<string, string> = {};
|
||||
@ -91,9 +89,7 @@ export function transformPronoun(
|
||||
plural: [pronoun.isPlural],
|
||||
pluralHonorific: [pronoun.isPluralHonorific],
|
||||
aliases: pronoun.keys.slice(1),
|
||||
history:
|
||||
pronoun.history ??
|
||||
(opts.historyDefaultsToWeirdGeneratorThing ? "__generator__" : ""),
|
||||
history: opts.isUserGenerated ? "__generator__" : pronoun.history ?? "",
|
||||
pronounceable: pronoun.isPronounceable,
|
||||
thirdForm: pronoun.thirdForm ?? null,
|
||||
smallForm: pronoun.smallForm ?? null,
|
||||
|
@ -93,7 +93,7 @@ export const plugin = async function (app: AppInstance) {
|
||||
locale,
|
||||
{
|
||||
processName: true,
|
||||
historyDefaultsToWeirdGeneratorThing: true,
|
||||
isUserGenerated: true,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ import * as SumlImpl from "suml";
|
||||
|
||||
declare module "suml";
|
||||
|
||||
console.log(SumlImpl);
|
||||
const instance = new SumlImpl.default();
|
||||
|
||||
export function parse(value: string): unknown {
|
||||
|
Loading…
x
Reference in New Issue
Block a user