mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-26 14:32:04 -04:00
sentence links
This commit is contained in:
parent
651b51224a
commit
b91b2b1479
@ -178,6 +178,13 @@ pronouns:
|
||||
- 'Osoba B używa {/ona=rodzaju żeńskiego}, więc zwracając się do osoby A lub mówiąc o niej będzie używała form żeńskich.'
|
||||
- 'Osoba C używa {/onu=dukaizmów} wymiennie z {/ono=rodzajem neutralnym}, więc zwracając się do osoby A lub mówiąc o num będzie używała form postpłciowych bądź neutralnych.'
|
||||
others: 'Pozostałe formy'
|
||||
sentence:
|
||||
subdomains: ['moje', 'nasze']
|
||||
prefixes: ['/to']
|
||||
examples:
|
||||
- 'moje.zaimki.pl/to/ono/jego'
|
||||
- 'moje.zaimki.pl/to/onu&ona'
|
||||
- 'nasze.zaimki.pl/to/oni/ich&one/ich'
|
||||
|
||||
pronunciation:
|
||||
enabled: true
|
||||
|
@ -94,6 +94,8 @@ pronouns:
|
||||
othersRaw: 'inne'
|
||||
or: 'lub'
|
||||
grammarTable: 'Odmiana'
|
||||
sentence:
|
||||
'Oprócz domyślnych linków możesz też podlinkować do swoich zaimków tak, aby URL czytało się niemal jak zdanie, na przykład:'
|
||||
|
||||
sources:
|
||||
header: 'Teksty kultury'
|
||||
|
@ -318,15 +318,17 @@ export default {
|
||||
}
|
||||
|
||||
if (config.pronouns.enabled) {
|
||||
routes.push({ path: `/${encodeURIComponent(config.pronouns.any)}`, component: resolve(__dirname, 'routes/any.vue') });
|
||||
routes.push({ path: `/${encodeURIComponent(config.pronouns.any)}::group`, component: resolve(__dirname, 'routes/any.vue') });
|
||||
if (config.pronouns.null && config.pronouns.null.routes) {
|
||||
for (let route of config.pronouns.null.routes) {
|
||||
routes.push({ path: '/' + encodeURIComponent(route), component: resolve(__dirname, 'routes/avoiding.vue') });
|
||||
for (let prefix of [...(config.pronouns.sentence ? config.pronouns.sentence.prefixes : []), '']) {
|
||||
routes.push({ path: `${prefix}/${encodeURIComponent(config.pronouns.any)}`, component: resolve(__dirname, 'routes/any.vue') });
|
||||
routes.push({ path: `${prefix}/${encodeURIComponent(config.pronouns.any)}::group`, component: resolve(__dirname, 'routes/any.vue') });
|
||||
if (config.pronouns.null && config.pronouns.null.routes) {
|
||||
for (let route of config.pronouns.null.routes) {
|
||||
routes.push({ path: `${prefix}/${encodeURIComponent(route)}`, component: resolve(__dirname, 'routes/avoiding.vue') });
|
||||
}
|
||||
}
|
||||
if (config.pronouns.mirror) {
|
||||
routes.push({ path: `${prefix}/${encodeURIComponent(config.pronouns.mirror.route)}`, component: resolve(__dirname, 'routes/mirror.vue') });
|
||||
}
|
||||
}
|
||||
if (config.pronouns.mirror) {
|
||||
routes.push({ path: '/' + encodeURIComponent(config.pronouns.mirror.route), component: resolve(__dirname, 'routes/mirror.vue') });
|
||||
}
|
||||
}
|
||||
|
||||
@ -340,7 +342,7 @@ export default {
|
||||
routes.push({ path: '/api', component: resolve(__dirname, 'routes/api.vue') });
|
||||
}
|
||||
|
||||
routes.push({ name: 'all', path: '*', component: resolve(__dirname, 'routes/pronoun.vue') });
|
||||
routes.push({ name: 'all', path: `*`, component: resolve(__dirname, 'routes/pronoun.vue') });
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -3,6 +3,16 @@
|
||||
<section>
|
||||
<Suggested/>
|
||||
|
||||
<div v-if="config.pronouns.sentence" class="alert alert-info small">
|
||||
<Icon v="lightbulb-on"/>
|
||||
<T>pronouns.sentence</T>
|
||||
<ul class="mb-0">
|
||||
<li v-for="example in config.pronouns.sentence.examples">
|
||||
<a :href="`https://${example}`" target="_blank" rel="noopener">{{ example }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<ul class="list-group mt-4">
|
||||
<li v-for="[group, groupPronouns] in pronounLibrary.split()" class="list-group-item">
|
||||
<p class="h5">
|
||||
|
@ -48,6 +48,13 @@ export const buildPronoun = (pronouns, path) => {
|
||||
|
||||
const config = global.config || process.env.CONFIG;
|
||||
|
||||
for (let prefix of config.pronouns.sentence ? config.pronouns.sentence.prefixes : []) {
|
||||
if (('/' + path).startsWith(prefix + '/')) {
|
||||
path = path.substring(prefix.length);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
const pronounsWithAliases = addAliasesToPronouns(pronouns);
|
||||
|
||||
const pronounStr = path.split(',');
|
||||
|
Loading…
x
Reference in New Issue
Block a user