Compare commits

...
Author SHA1 Message Date
aecsocket aa98bffc26 fix ci 2026-05-26 23:31:24 +01:00
aecsocket 4229fe8966 update to main 2026-05-26 22:59:03 +01:00
ThatGravyBoatandGitHub f96520638b feat: Add user-images.githubusercontent.com in allowedHostnames (#6210)
feat: Allow user-images.githubusercontent.com in descriptions
2026-05-26 14:52:35 +00:00
Prospector 9e5d29ced6 hotfix 2026-05-24 12:14:13 -07:00
Prospector 3e15d0b287 changelog 2026-05-24 10:46:35 -07:00
ProspectorandGitHub bcce7e28fd fix: guard against non-strings when decorating download urls (#6194) 2026-05-24 10:42:27 -07:00
ProspectorandGitHub 3889d0f5ec fix: simplify preview banner translation key (#6192) 2026-05-24 10:39:39 -07:00
ProspectorandGitHub 6f44c5b039 feat: add 2 second auto close on skipped notifications (#6191) 2026-05-24 10:39:27 -07:00
Modrinth BotandGitHub ea967845d9 New translations from Crowdin (main) (#6193) 2026-05-24 17:25:25 +00:00
Prospector a6967cf9cb changelog 2026-05-24 09:26:36 -07:00
ProspectorandGitHub 5bf92863b0 fix: spanish locale (#6189) 2026-05-24 09:21:14 -07:00
Prospector 71b6ecc10c fix changelog... 2026-05-23 23:26:34 -07:00
Prospector ed28bc7551 remove april fools redirect 2026-05-23 22:03:59 -07:00
Prospector 3e4197db7c changelog 2026-05-23 22:02:49 -07:00
ProspectorandGitHub e12230ff59 feat: update default memory from 2GB to 4GB (#6172)
* feat: update default memory from 2GB to 4GB

* prepr
2026-05-23 21:26:51 -07:00
ProspectorandGitHub aeb9f5a075 fix: invalid auth cookie causing page not to load (#6186) 2026-05-23 21:26:13 -07:00
aecsocket 335478ff61 prepare 2026-05-23 21:22:42 +01:00
Calum H.andGitHub 8b17441f40 feat: compact logs if they have logspam to prevent app crashing (#6181)
* feat: compact logs if they have logspam to prevent app crashing

* fix: lint
2026-05-23 18:22:15 +00:00
aecsocket f048bdbca1 Split up analytics metrics into separate modules 2026-05-23 17:16:36 +01:00
f9d47e8edc feat: Add new "Enabled" sorting button next to "Disabled" (#6000)
* feat: Added new "Enabled" sorting button next to "Disabled"

* Updated when filter buttons show

- When all mods are disabled, only "Disabled" shows
- When all mods are enabled, only "Enabled" shows
- When there disabled and enabled mods, then only both buttons show.

* Updated when filter buttons show

---------

Co-authored-by: Prospector <6166773+Prospector@users.noreply.github.com>
2026-05-23 16:12:14 +00:00
a58bc3dc21 feat: java installation ui improvements (#5731)
* Clean impl of java installation ui improvements

* Migrate composable to ts

* Migrate to ButtonStyled, fix coloring

* Fix lint

* Fix clearing java path not refreshing state

* fix: use Table component + install btn disabled state tooltip

---------

Signed-off-by: Arthur <creeperkatze.dev@gmail.com>
Signed-off-by: Arthur <contact@creeperkatze.dev>
Co-authored-by: Creeperkatze <178587183+Creeperkatze@users.noreply.github.com>
Co-authored-by: Calum H. <calum@modrinth.com>
Co-authored-by: Calum H. (IMB11) <contact@cal.engineer>
2026-05-23 14:46:12 +00:00
ProspectorandGitHub 1e46444fb0 fix: checklist forcing redirects (#6173) 2026-05-22 15:53:22 -07:00
aecsocket f32939b082 prepare 2026-05-22 19:08:07 +01:00
aecsocket 2587cc2f11 filtering 2026-05-22 19:06:19 +01:00
aecsocket 2827b14026 cache download source regexes 2026-05-22 18:31:37 +01:00
aecsocket 5bba94c709 analytics facet fetching 2026-05-22 18:24:13 +01:00
aecsocket 2c11722484 all projects route for user 2026-05-22 18:01:39 +01:00
aecsocket 06c5c8bdb3 fix uri too long 2026-05-22 17:51:44 +01:00
118 changed files with 5740 additions and 2311 deletions
@@ -1,35 +1,33 @@
<template>
<ModalWrapper ref="detectJavaModal" header="Select java version" :show-ad-on-close="false">
<div class="auto-detect-modal">
<div class="table">
<div class="table-row table-head">
<div class="table-cell table-text">Version</div>
<div class="table-cell table-text">Path</div>
<div class="table-cell table-text">Actions</div>
</div>
<div v-for="javaInstall in chosenInstallOptions" :key="javaInstall.path" class="table-row">
<div class="table-cell table-text">
<span>{{ javaInstall.version }}</span>
</div>
<div v-tooltip="javaInstall.path" class="table-cell table-text">
<span>{{ javaInstall.path }}</span>
</div>
<div class="table-cell table-text manage">
<ButtonStyled v-if="currentSelected.path === javaInstall.path">
<button disabled><CheckIcon /> Selected</button>
<div class="flex flex-col gap-4">
<Table :columns="javaInstallColumns" :data="chosenInstallOptions" row-key="path">
<template #cell-version="{ value }">
<span class="font-semibold text-primary">{{ value }}</span>
</template>
<template #cell-path="{ value }">
<span v-tooltip="value" class="block truncate font-mono text-xs">{{ value }}</span>
</template>
<template #cell-actions="{ row }">
<div class="flex items-center justify-end">
<ButtonStyled v-if="currentSelected.path === row.path">
<button class="!shadow-none" disabled><CheckIcon /> Selected</button>
</ButtonStyled>
<ButtonStyled v-else>
<button @click="setJavaInstall(javaInstall)"><PlusIcon /> Select</button>
<button class="!shadow-none" @click="setJavaInstall(row)"><PlusIcon /> Select</button>
</ButtonStyled>
</div>
</div>
<div v-if="chosenInstallOptions.length === 0" class="table-row entire-row">
<div class="table-cell table-text">No java installations found!</div>
</div>
</div>
<div class="input-group push-right">
</template>
<template #empty-state>
<div class="p-4 text-secondary">No java installations found!</div>
</template>
</Table>
<div class="flex justify-end">
<ButtonStyled type="outlined">
<button @click="$refs.detectJavaModal.hide()">
<button
class="!shadow-none !border-surface-4 !border"
@click="$refs.detectJavaModal.hide()"
>
<XIcon />
Cancel
</button>
@@ -40,7 +38,7 @@
</template>
<script setup>
import { CheckIcon, PlusIcon, XIcon } from '@modrinth/assets'
import { ButtonStyled, injectNotificationManager } from '@modrinth/ui'
import { ButtonStyled, injectNotificationManager, Table } from '@modrinth/ui'
import { ref } from 'vue'
import ModalWrapper from '@/components/ui/modal/ModalWrapper.vue'
@@ -52,6 +50,11 @@ const { handleError } = injectNotificationManager()
const chosenInstallOptions = ref([])
const detectJavaModal = ref(null)
const currentSelected = ref({})
const javaInstallColumns = [
{ key: 'version', label: 'Version', width: '9rem' },
{ key: 'path', label: 'Path' },
{ key: 'actions', label: 'Actions', align: 'right', width: '10rem' },
]
defineExpose({
show: async (version, currentSelectedJava) => {
@@ -77,25 +80,3 @@ function setJavaInstall(javaInstall) {
})
}
</script>
<style lang="scss" scoped>
.auto-detect-modal {
.table {
.table-row {
grid-template-columns: 1fr 4fr min-content;
}
span {
display: inherit;
align-items: center;
justify-content: center;
}
padding: 0.5rem;
}
}
.manage {
display: flex;
gap: 0.5rem;
}
</style>
@@ -1,85 +1,104 @@
<template>
<JavaDetectionModal ref="detectJavaModal" @submit="(val) => emit('update:modelValue', val)" />
<div class="toggle-setting" :class="{ compact }">
<StyledInput
autocomplete="off"
:disabled="props.disabled"
:model-value="props.modelValue ? props.modelValue.path : ''"
:placeholder="placeholder ?? '/path/to/java'"
wrapper-class="installation-input"
@update:model-value="
(val) => {
emit('update:modelValue', {
...props.modelValue,
path: val,
})
}
"
/>
<div :id="props.id" class="toggle-setting" :class="{ compact }">
<div class="input-with-status">
<StyledInput
autocomplete="off"
:disabled="props.disabled"
:model-value="props.modelValue ? props.modelValue.path : ''"
:placeholder="placeholder ?? '/path/to/java'"
wrapper-class="installation-input"
@update:model-value="
(val) => {
emit('update:modelValue', {
...props.modelValue,
path: val,
})
}
"
/>
<ButtonStyled
:color="
!hoveringTest && !testingJava
? testingJavaSuccess === true
? 'green'
: 'red'
: 'standard'
"
color-fill="text"
>
<button
class="!shadow-none"
:disabled="testingJava || props.disabled"
@click="runTest(props.modelValue?.path)"
@mouseenter="!props.disabled && (hoveringTest = true)"
@mouseleave="hoveringTest = false"
>
<SpinnerIcon v-if="testingJava" class="animate-spin h-4 w-4" />
<CheckCircleIcon
v-else-if="testingJavaSuccess === true && !hoveringTest"
class="h-4 w-4"
/>
<XCircleIcon v-else-if="testingJavaSuccess !== true && !hoveringTest" class="h-4 w-4" />
<RefreshCwIcon v-else-if="!props.disabled" class="h-4 w-4" />
</button>
</ButtonStyled>
</div>
<span class="installation-buttons">
<ButtonStyled v-if="props.version">
<button :disabled="props.disabled || installingJava" @click="reinstallJava">
<button
v-tooltip="testingJavaSuccess === true ? 'Already installed' : undefined"
class="!shadow-none"
:disabled="props.disabled || installingJava || testingJavaSuccess === true"
@click="reinstallJava"
>
<DownloadIcon />
{{ installingJava ? 'Installing...' : 'Install recommended' }}
</button>
</ButtonStyled>
<ButtonStyled>
<button :disabled="props.disabled" @click="autoDetect">
<button class="!shadow-none" :disabled="props.disabled" @click="autoDetect">
<SearchIcon />
Detect
</button>
</ButtonStyled>
<ButtonStyled>
<button :disabled="props.disabled" @click="handleJavaFileInput()">
<button class="!shadow-none" :disabled="props.disabled" @click="handleJavaFileInput()">
<FolderSearchIcon />
Browse
</button>
</ButtonStyled>
<ButtonStyled v-if="testingJava">
<button disabled>Testing...</button>
</ButtonStyled>
<ButtonStyled v-else-if="testingJavaSuccess === true">
<button disabled>
<CheckIcon />
Success
</button>
</ButtonStyled>
<ButtonStyled v-else-if="testingJavaSuccess === false">
<button disabled>
<XIcon />
Failed
</button>
</ButtonStyled>
<ButtonStyled v-else>
<button :disabled="props.disabled" @click="testJava">
<PlayIcon />
Test
</button>
</ButtonStyled>
</span>
</div>
</template>
<script setup>
import {
CheckIcon,
CheckCircleIcon,
DownloadIcon,
FolderSearchIcon,
PlayIcon,
RefreshCwIcon,
SearchIcon,
XIcon,
SpinnerIcon,
XCircleIcon,
} from '@modrinth/assets'
import { ButtonStyled, injectNotificationManager, StyledInput } from '@modrinth/ui'
import { open } from '@tauri-apps/plugin-dialog'
import { ref } from 'vue'
import { ref, watch } from 'vue'
import JavaDetectionModal from '@/components/ui/JavaDetectionModal.vue'
import useJavaTest from '@/composables/useJavaTest'
import { trackEvent } from '@/helpers/analytics'
import { auto_install_java, find_filtered_jres, get_jre, test_jre } from '@/helpers/jre.js'
import { auto_install_java, find_filtered_jres, get_jre } from '@/helpers/jre.js'
const { handleError } = injectNotificationManager()
const props = defineProps({
id: {
type: String,
required: false,
default: null,
},
version: {
type: Number,
required: false,
@@ -110,29 +129,36 @@ const props = defineProps({
const emit = defineEmits(['update:modelValue'])
const testingJava = ref(false)
const testingJavaSuccess = ref(null)
const {
testingJava,
javaTestResult: testingJavaSuccess,
testJavaInstallationDebounced,
testJavaInstallation,
} = useJavaTest()
const installingJava = ref(false)
const hoveringTest = ref(false)
let hasInitialized = false
async function testJava() {
testingJava.value = true
testingJavaSuccess.value = await test_jre(
props.modelValue ? props.modelValue.path : '',
props.version,
)
testingJava.value = false
trackEvent('JavaTest', {
path: props.modelValue ? props.modelValue.path : '',
success: testingJavaSuccess.value,
})
setTimeout(() => {
testingJavaSuccess.value = null
}, 2000)
async function runTest(path) {
await testJavaInstallation(path, props.version, true)
}
watch(
() => props.modelValue?.path,
(newPath) => {
if (newPath) {
if (!hasInitialized) {
testJavaInstallation(newPath, props.version, false)
hasInitialized = true
} else {
testJavaInstallationDebounced(newPath, props.version)
}
}
},
{ immediate: true },
)
async function handleJavaFileInput() {
const filePath = await open()
@@ -142,6 +168,7 @@ async function handleJavaFileInput() {
result = {
path: filePath.path ?? filePath,
version: props.version.toString(),
parsed_version: props.version,
architecture: 'x86',
}
}
@@ -175,6 +202,7 @@ async function reinstallJava() {
result = {
path: path,
version: props.version.toString(),
parsed_version: props.version,
architecture: 'x86',
}
}
@@ -186,13 +214,23 @@ async function reinstallJava() {
emit('update:modelValue', result)
installingJava.value = false
runTest(result.path)
}
</script>
<style lang="scss" scoped>
.input-with-status {
display: flex;
flex-direction: row;
align-items: center;
gap: 0.5rem;
width: 100%;
min-width: 0;
}
.installation-input {
width: 100% !important;
flex-grow: 1;
flex: 1 1 0;
min-width: 0;
}
.toggle-setting {
@@ -215,12 +253,4 @@ async function reinstallJava() {
gap: 0.5rem;
margin: 0;
}
.test-success {
color: var(--color-green);
}
.test-fail {
color: var(--color-red);
}
</style>
@@ -1,6 +1,15 @@
<script setup lang="ts">
import { CheckCircleIcon, XCircleIcon } from '@modrinth/assets'
import {
CheckCircleIcon,
CoffeeIcon,
FolderSearchIcon,
RefreshCwIcon,
SearchIcon,
SpinnerIcon,
XCircleIcon,
} from '@modrinth/assets'
import {
ButtonStyled,
Checkbox,
defineMessages,
injectNotificationManager,
@@ -8,9 +17,11 @@ import {
StyledInput,
useVIntl,
} from '@modrinth/ui'
import { open } from '@tauri-apps/plugin-dialog'
import { computed, readonly, ref, watch } from 'vue'
import JavaSelector from '@/components/ui/JavaSelector.vue'
import JavaDetectionModal from '@/components/ui/JavaDetectionModal.vue'
import useJavaTest from '@/composables/useJavaTest'
import useMemorySlider from '@/composables/useMemorySlider'
import { edit, get_optimal_jre_key } from '@/helpers/profile'
import { get } from '@/helpers/settings.ts'
@@ -25,9 +36,54 @@ const { instance } = injectInstanceSettings()
const globalSettings = (await get().catch(handleError)) as unknown as AppSettings
const overrideJavaInstall = ref(!!instance.value.java_path)
const optimalJava = readonly(await get_optimal_jre_key(instance.value.path).catch(handleError))
const javaInstall = ref({ path: optimalJava.path ?? instance.value.java_path })
const overrideJavaInstall = ref(!!instance.value.java_path)
const javaPath = ref(instance.value.java_path ?? optimalJava?.path ?? '')
const activePath = computed(() =>
overrideJavaInstall.value ? javaPath.value : (optimalJava?.path ?? ''),
)
watch(overrideJavaInstall, (enabled) => {
if (enabled && !javaPath.value) {
javaPath.value = optimalJava?.path ?? ''
}
})
const { testingJava, javaTestResult, testJavaInstallationDebounced, testJavaInstallation } =
useJavaTest()
const hoveringTest = ref(false)
let hasInitialized = false
watch(
activePath,
(newPath) => {
if (newPath && optimalJava?.parsed_version) {
if (!hasInitialized) {
testJavaInstallation(newPath, optimalJava?.parsed_version, false)
hasInitialized = true
} else {
testJavaInstallationDebounced(newPath, optimalJava?.parsed_version)
}
}
},
{ immediate: true },
)
const javaDetectionModal = ref<{ show: (version: number, current: object) => void } | null>(null)
async function handleBrowseJava() {
const result = await open({ multiple: false })
if (result) {
javaPath.value = result
}
}
function handleDetectJava() {
javaDetectionModal.value?.show(optimalJava?.parsed_version, { path: javaPath.value })
}
const overrideJavaArgs = ref((instance.value.extra_launch_args?.length ?? 0) > 0)
const javaArgs = ref(
@@ -51,8 +107,8 @@ const { maxMemory, snapPoints } = (await useMemorySlider().catch(handleError)) a
const editProfileObject = computed(() => {
return {
java_path:
overrideJavaInstall.value && javaInstall.value.path !== ''
? javaInstall.value.path.replace('java.exe', 'javaw.exe')
overrideJavaInstall.value && javaPath.value
? javaPath.value.replace('java.exe', 'javaw.exe')
: null,
extra_launch_args: overrideJavaArgs.value
? javaArgs.value.trim().split(/\s+/).filter(Boolean)
@@ -71,7 +127,7 @@ const editProfileObject = computed(() => {
watch(
[
overrideJavaInstall,
javaInstall,
javaPath,
overrideJavaArgs,
javaArgs,
overrideEnvVars,
@@ -90,17 +146,45 @@ const messages = defineMessages({
id: 'instance.settings.tabs.java.java-installation',
defaultMessage: 'Java installation',
},
customJavaInstallation: {
id: 'instance.settings.tabs.java.custom-java-installation',
defaultMessage: 'Custom Java installation',
},
javaPathPlaceholder: {
id: 'instance.settings.tabs.java.java-path-placeholder',
defaultMessage: '/path/to/java',
},
javaMemory: {
id: 'instance.settings.tabs.java.java-memory',
defaultMessage: 'Memory allocated',
},
customMemoryAllocation: {
id: 'instance.settings.tabs.java.custom-memory-allocation',
defaultMessage: 'Custom memory allocation',
},
javaArguments: {
id: 'instance.settings.tabs.java.java-arguments',
defaultMessage: 'Java arguments',
},
customJavaArguments: {
id: 'instance.settings.tabs.java.custom-java-arguments',
defaultMessage: 'Custom Java arguments',
},
enterJavaArguments: {
id: 'instance.settings.tabs.java.enter-java-arguments',
defaultMessage: 'Enter Java arguments...',
},
javaEnvironmentVariables: {
id: 'instance.settings.tabs.java.environment-variables',
defaultMessage: 'Environment variables',
},
javaMemory: {
id: 'instance.settings.tabs.java.java-memory',
defaultMessage: 'Memory allocated',
customEnvironmentVariables: {
id: 'instance.settings.tabs.java.custom-environment-variables',
defaultMessage: 'Custom environment variables',
},
enterEnvironmentVariables: {
id: 'instance.settings.tabs.java.enter-environment-variables',
defaultMessage: 'Enter environmental variables...',
},
hooks: {
id: 'instance.settings.tabs.java.hooks',
@@ -111,43 +195,86 @@ const messages = defineMessages({
<template>
<div>
<h2 id="project-name" class="m-0 mb-2.5 text-lg font-semibold text-contrast block">
<JavaDetectionModal ref="javaDetectionModal" @submit="(val) => (javaPath = val.path)" />
<h2 class="m-0 mb-2 text-lg font-extrabold text-contrast block">
{{ formatMessage(messages.javaInstallation) }}
</h2>
<Checkbox v-model="overrideJavaInstall" label="Custom Java installation" class="mb-2.5" />
<template v-if="!overrideJavaInstall">
<div class="flex my-2 items-center gap-2 font-semibold">
<template v-if="javaInstall">
<CheckCircleIcon class="text-brand-green h-4 w-4" />
<span>Using default Java {{ optimalJava.major_version }} installation:</span>
</template>
<template v-else-if="optimalJava">
<XCircleIcon class="text-brand-red h-5 w-5" />
<span
>Could not find a default Java {{ optimalJava.major_version }} installation. Please set
one below:</span
<Checkbox
v-model="overrideJavaInstall"
:label="formatMessage(messages.customJavaInstallation)"
class="mb-2"
/>
<div class="flex gap-4 p-4 bg-bg rounded-2xl">
<div class="flex gap-3 items-start flex-1 min-w-0">
<div
class="w-10 h-10 flex items-center justify-center rounded-full bg-button-bg border-solid border-[1px] border-button-border p-2 mt-1 shrink-0 [&_svg]:h-full [&_svg]:w-full"
>
<CoffeeIcon />
</div>
<div class="flex flex-col gap-2 flex-1 min-w-0">
<span class="font-semibold leading-none mt-2"
>Java {{ optimalJava?.parsed_version }}</span
>
</template>
<template v-else>
<XCircleIcon class="text-brand-red h-5 w-5" />
<span
>Could not automatically determine a Java installation to use. Please set one
below:</span
>
</template>
<div class="flex gap-2 items-center">
<StyledInput
:model-value="activePath"
:disabled="!overrideJavaInstall"
autocomplete="off"
:placeholder="formatMessage(messages.javaPathPlaceholder)"
wrapper-class="flex-1 min-w-0"
@update:model-value="(val) => (javaPath = String(val))"
/>
<ButtonStyled
:color="
!hoveringTest && !testingJava
? javaTestResult === true
? 'green'
: 'red'
: 'standard'
"
color-fill="text"
>
<button
:disabled="!overrideJavaInstall || testingJava"
@click="testJavaInstallation(activePath, optimalJava?.parsed_version, true)"
@mouseenter="overrideJavaInstall && (hoveringTest = true)"
@mouseleave="hoveringTest = false"
>
<SpinnerIcon v-if="testingJava" class="animate-spin h-4 w-4" />
<CheckCircleIcon
v-else-if="javaTestResult === true && !hoveringTest"
class="h-4 w-4"
/>
<XCircleIcon v-else-if="javaTestResult !== true && !hoveringTest" class="h-4 w-4" />
<RefreshCwIcon v-else-if="overrideJavaInstall" class="h-4 w-4" />
</button>
</ButtonStyled>
</div>
<div v-if="overrideJavaInstall" class="flex gap-2">
<ButtonStyled>
<button @click="handleDetectJava">
<SearchIcon />
Detect
</button>
</ButtonStyled>
<ButtonStyled>
<button @click="handleBrowseJava">
<FolderSearchIcon />
Browse
</button>
</ButtonStyled>
</div>
</div>
</div>
<div
v-if="javaInstall && !overrideJavaInstall"
class="p-4 bg-bg rounded-xl text-xs text-secondary leading-none font-mono"
>
{{ javaInstall.path }}
</div>
</template>
<JavaSelector v-if="overrideJavaInstall || !javaInstall" v-model="javaInstall" />
<h2 id="project-name" class="mt-6 mb-2.5 text-lg font-semibold text-contrast block">
</div>
<h2 class="mt-4 mb-1 text-lg font-extrabold text-contrast block">
{{ formatMessage(messages.javaMemory) }}
</h2>
<Checkbox v-model="overrideMemorySettings" label="Custom memory allocation" class="mb-2.5" />
<Checkbox
v-model="overrideMemorySettings"
:label="formatMessage(messages.customMemoryAllocation)"
class="mb-2"
/>
<Slider
id="max-memory"
v-model="memory.maximum"
@@ -159,28 +286,36 @@ const messages = defineMessages({
:snap-range="512"
unit="MB"
/>
<h2 id="project-name" class="mt-6 mb-2.5 text-lg font-semibold text-contrast block">
<h2 class="mt-4 mb-1 text-lg font-extrabold text-contrast block">
{{ formatMessage(messages.javaArguments) }}
</h2>
<Checkbox v-model="overrideJavaArgs" label="Custom java arguments" class="my-2" />
<Checkbox
v-model="overrideJavaArgs"
:label="formatMessage(messages.customJavaArguments)"
class="my-2"
/>
<StyledInput
id="java-args"
v-model="javaArgs"
autocomplete="off"
:disabled="!overrideJavaArgs"
placeholder="Enter java arguments..."
:placeholder="formatMessage(messages.enterJavaArguments)"
wrapper-class="w-full"
/>
<h2 id="project-name" class="mt-6 mb-2.5 text-lg font-semibold text-contrast block">
<h2 class="mt-4 mb-1 text-lg font-extrabold text-contrast block">
{{ formatMessage(messages.javaEnvironmentVariables) }}
</h2>
<Checkbox v-model="overrideEnvVars" label="Custom environment variables" class="mb-2.5" />
<Checkbox
v-model="overrideEnvVars"
:label="formatMessage(messages.customEnvironmentVariables)"
class="mb-2"
/>
<StyledInput
id="env-vars"
v-model="envVars"
autocomplete="off"
:disabled="!overrideEnvVars"
placeholder="Enter environmental variables..."
:placeholder="formatMessage(messages.enterEnvironmentVariables)"
wrapper-class="w-full"
/>
</div>
@@ -8,7 +8,7 @@ interface LogEntry {
filename: string
name?: string
log_type: string
stdout?: string
output?: string | null
age?: number
live?: boolean
}
@@ -50,12 +50,12 @@ async function getHistoricalLogs(profilePathId: string, instancePath: string): P
const entry = getOrCreate(profilePathId)
if (entry.logList) return entry.logList
const logs: LogEntry[] = await get_logs(instancePath, false)
const logs: LogEntry[] = await get_logs(instancePath, true)
entry.logList = logs
for (const log of logs) {
if (log.stdout && log.stdout !== '') {
entry.historicalCache.set(log.filename, log.stdout)
if (log.output) {
entry.historicalCache.set(log.filename, log.output)
}
}
@@ -0,0 +1,52 @@
import { ref } from 'vue'
import { trackEvent } from '@/helpers/analytics'
import { test_jre } from '@/helpers/jre.js'
export default function useJavaTest() {
const testingJava = ref(false)
const javaTestResult = ref<boolean | null>(null)
let testDebounceTimer: ReturnType<typeof setTimeout> | null = null
async function runJavaTest(path: string, version: number, track = true) {
if (testDebounceTimer) {
clearTimeout(testDebounceTimer)
testDebounceTimer = null
}
if (!path) {
javaTestResult.value = null
return
}
testingJava.value = true
try {
javaTestResult.value = await test_jre(path, version)
} catch {
javaTestResult.value = false
}
testingJava.value = false
if (track) {
trackEvent('JavaTest', { path, success: javaTestResult.value })
}
}
function testJavaInstallationDebounced(path: string, version: number, delay = 600) {
if (testDebounceTimer) clearTimeout(testDebounceTimer)
if (!path) {
javaTestResult.value = null
return
}
testDebounceTimer = setTimeout(() => runJavaTest(path, version, false), delay)
}
async function testJavaInstallation(path: string, version: number, track = false) {
await runJavaTest(path, version, track)
}
return {
testingJava,
javaTestResult,
testJavaInstallationDebounced,
testJavaInstallation,
}
}
+2 -3
View File
@@ -6,12 +6,11 @@
import { invoke } from '@tauri-apps/api/core'
/*
A log is a struct containing the filename string, stdout, and stderr, as follows:
A log is a struct containing the filename string and optional output, as follows:
pub struct Logs {
pub filename: String,
pub stdout: String,
pub stderr: String,
pub output: Option<String>,
}
*/
+8 -1
View File
@@ -147,9 +147,16 @@ export async function get_mod_full_path(path: string, projectPath: string): Prom
return await invoke('plugin:profile|profile_get_mod_full_path', { path, projectPath })
}
export interface JavaVersion {
parsed_version: number
version: string
architecture: string
path: string
}
// Get optimal java version from profile
// Returns a java version
export async function get_optimal_jre_key(path: string): Promise<string | null> {
export async function get_optimal_jre_key(path: string): Promise<JavaVersion | null> {
return await invoke('plugin:profile|profile_get_optimal_jre_key', { path })
}
@@ -302,6 +302,9 @@
"app.project.install-button.already-installed": {
"message": "Tento projekt je již nainstalován"
},
"app.project.install-context.back-to-browse": {
"message": "Zpět na Prozkoumat"
},
"app.project.install-context.install-content-to-instance": {
"message": "Nainstalovat obsah do instnce"
},
@@ -104,6 +104,12 @@
"app.browse.discover-servers": {
"message": "Opdag servere"
},
"app.browse.project-type.modpacks": {
"message": "Modpacks"
},
"app.creation-modal.installing-modpack.description": {
"message": "{fileName}"
},
"app.export-modal.description-placeholder": {
"message": "Indtast modpack beskrivelse..."
},
@@ -611,6 +611,24 @@
"instance.settings.tabs.java": {
"message": "Java and memory"
},
"instance.settings.tabs.java.custom-environment-variables": {
"message": "Custom environment variables"
},
"instance.settings.tabs.java.custom-java-arguments": {
"message": "Custom Java arguments"
},
"instance.settings.tabs.java.custom-java-installation": {
"message": "Custom Java installation"
},
"instance.settings.tabs.java.custom-memory-allocation": {
"message": "Custom memory allocation"
},
"instance.settings.tabs.java.enter-environment-variables": {
"message": "Enter environmental variables..."
},
"instance.settings.tabs.java.enter-java-arguments": {
"message": "Enter Java arguments..."
},
"instance.settings.tabs.java.environment-variables": {
"message": "Environment variables"
},
@@ -626,6 +644,9 @@
"instance.settings.tabs.java.java-memory": {
"message": "Memory allocated"
},
"instance.settings.tabs.java.java-path-placeholder": {
"message": "/path/to/java"
},
"instance.settings.tabs.window": {
"message": "Window"
},
+52 -7
View File
@@ -21,7 +21,7 @@
"message": "Instancia principal"
},
"app.action-bar.show-more-running-instances": {
"message": "Mostrar mas instancias en ejecución"
"message": "Mostrar más instancias en ejecución"
},
"app.action-bar.stop-instance": {
"message": "Finalizar instancia"
@@ -48,7 +48,7 @@
"message": "Tema de color"
},
"app.appearance-settings.default-landing-page.description": {
"message": "Cambia la página en la que el launcher se abre en."
"message": "Cambia la página en la que el lanzador inicia."
},
"app.appearance-settings.default-landing-page.home": {
"message": "Inicio"
@@ -72,13 +72,13 @@
"message": "Vuelve a jugar tus mundos"
},
"app.appearance-settings.minimize-launcher.description": {
"message": "Minimiza el launcher cuando un proceso de Minecraft empieza."
"message": "Minimiza el lanzador cuando un proceso de Minecraft empieza."
},
"app.appearance-settings.minimize-launcher.title": {
"message": "Minimiza el launcher"
"message": "Minimiza el lanzador"
},
"app.appearance-settings.native-decorations.description": {
"message": "Usa los sistemas de frame de Windows (se requiere resetear la aplicación)."
"message": "Usa los sistemas de marco de Windows (se requiere resetear la aplicación)."
},
"app.appearance-settings.native-decorations.title": {
"message": "Decoraciones nativas"
@@ -93,10 +93,10 @@
"message": "Alternar barra lateral"
},
"app.appearance-settings.unknown-pack-warning.description": {
"message": "Si intentas instalar un archivo de paquete de Modrinth (.mrpack) que no esté alojado en Modrinth, te advertiremos de los riesgos antes de instalarlo."
"message": "Si intentas instalar un archivo de paquete de Modrinth (.mrpack) que no esté alojado en Modrinth, debes comprender los riesgos que esto conlleva antes de instalarlo."
},
"app.appearance-settings.unknown-pack-warning.title": {
"message": "Adviérteme antes de instalarme modpacks desconocidos"
"message": "Advertir antes de instalarme paquetes de mods desconocidos"
},
"app.auth-servers.unreachable.body": {
"message": "Los servidores de autenticación de Minecraft pueden no estar funcionando en este momento. Verifica tu conexión a internet e inténtalo de nuevo más tarde."
@@ -104,6 +104,12 @@
"app.auth-servers.unreachable.header": {
"message": "No se puede conectar con los servidores de autenticación"
},
"app.browse.add-servers-to-instance": {
"message": "Añadir servidor a instancia"
},
"app.browse.add-to-an-instance": {
"message": "Añadir a una instancia"
},
"app.browse.add-to-instance": {
"message": "Añadir a la instancia"
},
@@ -116,6 +122,9 @@
"app.browse.already-added": {
"message": "Ya está añadido"
},
"app.browse.back-to-instance": {
"message": "Volver a la instancia"
},
"app.browse.discover-content": {
"message": "Descubrir contenido"
},
@@ -128,6 +137,9 @@
"app.browse.project-type.modpacks": {
"message": "Modpacks"
},
"app.browse.server-instance-content-warning": {
"message": "Añadir contenido puede comprometer la compatibilidad a la hora de unirse a un servidor. Cualquier contenido añadido se perderá cuando actualices la instancia del servidor."
},
"app.browse.server.installing": {
"message": "Instalando"
},
@@ -146,12 +158,18 @@
"app.export-modal.header": {
"message": "Exportar modpack"
},
"app.export-modal.include-file-accessibility-label": {
"message": "¿Incluir \"{file}\"?"
},
"app.export-modal.modpack-name-label": {
"message": "Nombre del modpack"
},
"app.export-modal.modpack-name-placeholder": {
"message": "Nombre del modpack"
},
"app.export-modal.select-files-label": {
"message": "Configura que archivos se incluirán en esta instancia"
},
"app.export-modal.version-number-label": {
"message": "Número de versión"
},
@@ -281,6 +299,15 @@
"app.modal.update-to-play.update-required-description": {
"message": "Una actualización es requerida para jugar {name}. Por favor actualízala a la versión más reciente para ejecutar el juego."
},
"app.project.install-button.already-installed": {
"message": "El proyecto ya está instalado"
},
"app.project.install-context.back-to-browse": {
"message": "Volver a descubrir"
},
"app.project.install-context.install-content-to-instance": {
"message": "Instalar contenido"
},
"app.settings.developer-mode-enabled": {
"message": "Modo desarrollador activado."
},
@@ -671,6 +698,24 @@
"instance.worlds.world_in_use": {
"message": "El mundo está en uso"
},
"minecraft-account.add-account": {
"message": "Añadir cuenta"
},
"minecraft-account.label": {
"message": "Cuenta de Minecraft"
},
"minecraft-account.not-signed-in": {
"message": "Registrarse"
},
"minecraft-account.remove-account": {
"message": "Eliminar cuenta"
},
"minecraft-account.select-account": {
"message": "Seleccionar cuenta"
},
"minecraft-account.sign-in": {
"message": "Registrarse en Minecraft"
},
"search.filter.locked.instance": {
"message": "Proporcionado por la instancia"
},
@@ -1,10 +1,115 @@
{
"app.action-bar.downloading-java": {
"message": "Ladataan Java-versiota {version}"
},
"app.action-bar.downloads": {
"message": "Lataukset"
},
"app.action-bar.hide-more-running-instances": {
"message": "Piilota enemmän käynnissä olevia instansseja"
},
"app.action-bar.make-primary-instance": {
"message": "Aseta ensisijaiseksi instanssiksi"
},
"app.action-bar.no-instances-running": {
"message": "Ei instansseja käynnissä"
},
"app.action-bar.offline": {
"message": "Offline-tilassa"
},
"app.action-bar.primary-instance": {
"message": "Ensisijainen instanssi"
},
"app.action-bar.show-more-running-instances": {
"message": "Näytä enemmän käynnissä olevia instansseja"
},
"app.action-bar.stop-instance": {
"message": "Pysäytä instanssi"
},
"app.action-bar.view-active-downloads": {
"message": "Näytä aktiiviset lataukset"
},
"app.action-bar.view-instance": {
"message": "Katso intanssia"
},
"app.action-bar.view-logs": {
"message": "Katso lokeja"
},
"app.appearance-settings.advanced-rendering.description": {
"message": "Mahdollistaa edistyneen renderöinnin, kuten sumennus efektit, jotka voivat aiheuttaa suorituskykyongelmia ilman laitteistokiihdytettyä renderöintiä."
},
"app.appearance-settings.advanced-rendering.title": {
"message": "Edistynyt renderointi"
},
"app.appearance-settings.color-theme.description": {
"message": "Valitse haluamasi väriteema Modrinth Appille."
},
"app.appearance-settings.color-theme.title": {
"message": "Väriteema"
},
"app.appearance-settings.default-landing-page.description": {
"message": "Muuta sivua mille laukaisin avautuu."
},
"app.appearance-settings.default-landing-page.home": {
"message": "Koti"
},
"app.appearance-settings.default-landing-page.library": {
"message": "Kirjasto"
},
"app.appearance-settings.default-landing-page.title": {
"message": "Oletus laskeutumissivu"
},
"app.appearance-settings.hide-nametag.description": {
"message": "Kytkee pois päältä nimikyltin pelaajasi päällä skinit sivulla."
},
"app.appearance-settings.hide-nametag.title": {
"message": "Piilota nimikyltti"
},
"app.appearance-settings.jump-back-into-worlds.description": {
"message": "Sisällyttää viimeaikaiset maailmat \"Hyppää takaisin sisään\" osiossa Koti sivulla."
},
"app.appearance-settings.jump-back-into-worlds.title": {
"message": "Hyppää takaisin sisään maailmoihin"
},
"app.appearance-settings.minimize-launcher.description": {
"message": "Pienennä laukaisin kun Minecraft prosessi käynnistyy."
},
"app.appearance-settings.minimize-launcher.title": {
"message": "Piilota käynnistysohjelma"
},
"app.appearance-settings.native-decorations.description": {
"message": "Käytä järjestelmän ikkuna kehystä (Vaatii sovelluksen uudelleen käynnistämisen)."
},
"app.appearance-settings.native-decorations.title": {
"message": "Natiivit koristukset"
},
"app.appearance-settings.select-option": {
"message": "Valitse vaihtoehto"
},
"app.appearance-settings.toggle-sidebar.description": {
"message": "Laittaa päälle mahdollisuuden kytkeä sivupalkkia."
},
"app.appearance-settings.toggle-sidebar.title": {
"message": "Kytke sivupalkki"
},
"app.appearance-settings.unknown-pack-warning.description": {
"message": "Jos yrität asentaa Modrinth-pakettitiedoston (.mrpack), jota ei ole isännöity Modrinthissä, varmistamme, että ymmärrät riskit ennen asennusta."
},
"app.appearance-settings.unknown-pack-warning.title": {
"message": "Varoita minua ennen tuntemattomien modipakettien asentamista"
},
"app.auth-servers.unreachable.body": {
"message": "Minecraftin todennuspalvelimet eivät ehkä ole tällä hetkellä tavoitettavissa. Tarkista internetyhteytesi ja yritä myöhemmin uudelleen."
},
"app.auth-servers.unreachable.header": {
"message": "Todennuspalvelimiin ei saada yhteyttä"
},
"app.browse.add-servers-to-instance": {
"message": "Lisää palvelin instanssiin"
},
"app.browse.add-to-an-instance": {
"message": "Lisää instanssiin"
},
"app.browse.add-to-instance": {
"message": "Lisää instanssiin"
},
@@ -17,12 +122,33 @@
"app.browse.already-added": {
"message": "On jo asennettu"
},
"app.browse.back-to-instance": {
"message": "Takaisin instanssiin"
},
"app.browse.discover-content": {
"message": "Löydä sisältöä"
},
"app.browse.discover-servers": {
"message": "Löydä palvelimia"
},
"app.browse.hide-added-servers": {
"message": "Piilota lisätyt palvelimet"
},
"app.browse.project-type.modpacks": {
"message": "Modipaketit"
},
"app.browse.server-instance-content-warning": {
"message": "Sisällön lisääminen voi rikkoa yhteensopivuuden palvelimelle liittyessä. Kaikki lisätty sisältö katoaa myös kun päivität palvelin instanssin sisällön."
},
"app.browse.server.installing": {
"message": "Asennetaan"
},
"app.creation-modal.installing-modpack.description": {
"message": "{fileName}"
},
"app.creation-modal.installing-modpack.title": {
"message": "Asennetaan modipakettia..."
},
"app.export-modal.description-placeholder": {
"message": "Lisää modipaketin kuvaus..."
},
@@ -32,12 +158,18 @@
"app.export-modal.header": {
"message": "Vie modipaketti"
},
"app.export-modal.include-file-accessibility-label": {
"message": "Sisällytä \"{file}\"?"
},
"app.export-modal.modpack-name-label": {
"message": "Modipaketin nimi"
},
"app.export-modal.modpack-name-placeholder": {
"message": "Modipaketin nimi"
},
"app.export-modal.select-files-label": {
"message": "Muuta mitkä tiedostot sisältyvät tähän vientiin"
},
"app.export-modal.version-number-label": {
"message": "Versio numero"
},
@@ -80,6 +212,9 @@
"app.instance.mods.share-text": {
"message": "Tsekkaa projektit joita käytän minun modipaketissani!"
},
"app.instance.mods.share-title": {
"message": "Jaetaan modipaketti sisältöä"
},
"app.instance.mods.successfully-uploaded": {
"message": "Onnistuneesti ladattu"
},
@@ -164,6 +299,15 @@
"app.modal.update-to-play.update-required-description": {
"message": "Pävitys vaaditaan pelataksesi {name}. Päivitä viimeisimpään versioon pelataksesi."
},
"app.project.install-button.already-installed": {
"message": "Tämä projekti on jo asennettu"
},
"app.project.install-context.back-to-browse": {
"message": "Takaisin sisällön löytöön"
},
"app.project.install-context.install-content-to-instance": {
"message": "Asenna sisältöä instanssiin"
},
"app.settings.developer-mode-enabled": {
"message": "Kehittäjätila käytössä."
},
@@ -467,6 +611,24 @@
"instance.settings.tabs.java": {
"message": "Java ja muisti"
},
"instance.settings.tabs.java.custom-environment-variables": {
"message": "Mukautetut ympäristö muuttujat"
},
"instance.settings.tabs.java.custom-java-arguments": {
"message": "Mukautetut Java argumentit"
},
"instance.settings.tabs.java.custom-java-installation": {
"message": "Mukautettu Java asennus"
},
"instance.settings.tabs.java.custom-memory-allocation": {
"message": "Mukautettu muistin allokointi"
},
"instance.settings.tabs.java.enter-environment-variables": {
"message": "Syötä ympäristö muuttujat..."
},
"instance.settings.tabs.java.enter-java-arguments": {
"message": "Syötä Java argumentit..."
},
"instance.settings.tabs.java.environment-variables": {
"message": "Ympäristö muuttujat"
},
@@ -482,6 +644,9 @@
"instance.settings.tabs.java.java-memory": {
"message": "Muisti allokoitu"
},
"instance.settings.tabs.java.java-path-placeholder": {
"message": "/javaan/johtava/polku/"
},
"instance.settings.tabs.window": {
"message": "Ikkuna"
},
@@ -554,6 +719,24 @@
"instance.worlds.world_in_use": {
"message": "Maailma on käytössä"
},
"minecraft-account.add-account": {
"message": "Lisää tili"
},
"minecraft-account.label": {
"message": "Minecraft tili"
},
"minecraft-account.not-signed-in": {
"message": "Ei kirjautuneena sisään"
},
"minecraft-account.remove-account": {
"message": "Poista tili"
},
"minecraft-account.select-account": {
"message": "Valitse tili"
},
"minecraft-account.sign-in": {
"message": "Kirjaudu sisään Minecraftiin"
},
"search.filter.locked.instance": {
"message": "Annettu instanssin toimesta"
},
@@ -577,5 +760,26 @@
},
"search.filter.locked.server-loader.title": {
"message": "Modialusta on palvelimen tarjoama"
},
"unknown-pack-warning-modal.body": {
"message": "Tiedosto tarkistetaan vain jos se on ladattu Modrinthiin, riippumatta tiedoston muodosta (mukaanlukien .mrpack)."
},
"unknown-pack-warning-modal.dont-show-again": {
"message": "Älä näytä tätä varoitusta uudestaan"
},
"unknown-pack-warning-modal.header": {
"message": "Vahvista asennus"
},
"unknown-pack-warning-modal.install-anyway": {
"message": "Asenna jokatapauksessa"
},
"unknown-pack-warning-modal.malware-statement": {
"message": "Haittaohjelmia levitetään usein modipaketti tiedostojen kautta jakamalla niitä alustoilla kuten Discordissa."
},
"unknown-pack-warning-modal.warning.body": {
"message": "Emme löytäneet tätä tiedostoa Modrinthista. Suosittelemme vahvasti että asennat tiedostoja vain lähteistä joihin luotat."
},
"unknown-pack-warning-modal.warning.title": {
"message": "Tuntematon tiedosto varoitus"
}
}
@@ -729,7 +729,7 @@
"message": "Kumpirmahin ang installation"
},
"unknown-pack-warning-modal.install-anyway": {
"message": "I-install parin"
"message": "I-install pa rin"
},
"unknown-pack-warning-modal.malware-statement": {
"message": "Ang malware ay madalas naidadala sa mga modpack files sa pamamagitan ng pag-bigay ng mga ito sa mga platforms kagaya ng Discord."
@@ -71,6 +71,9 @@
"app.appearance-settings.select-option": {
"message": "Pilih opsi"
},
"app.appearance-settings.unknown-pack-warning.title": {
"message": "Peringatkan saya sebelum memasang paket mod tidak dikenal"
},
"app.auth-servers.unreachable.body": {
"message": "Server autentikasi Minecraft mungkin sedang tidak tersedia saat ini. Periksa koneksi internet Anda dan coba lagi nanti."
},
@@ -269,6 +272,9 @@
"app.modal.update-to-play.update-required-description": {
"message": "{name} perlu diperbarui sebelum dimainkan. Mohon perbarui ke versi terkini untuk meluncurkan permainan."
},
"app.project.install-context.install-content-to-instance": {
"message": "Pasang konten ke instans"
},
"app.settings.developer-mode-enabled": {
"message": "Mode pengembang dihidupkan."
},
@@ -659,6 +665,21 @@
"instance.worlds.world_in_use": {
"message": "Dunia sedang dimainkan"
},
"minecraft-account.add-account": {
"message": "Tambah akun"
},
"minecraft-account.label": {
"message": "Akun Minecraft"
},
"minecraft-account.not-signed-in": {
"message": "Tidak masuk"
},
"minecraft-account.remove-account": {
"message": "Hapus akun"
},
"minecraft-account.select-account": {
"message": "Pilih akun"
},
"search.filter.locked.instance": {
"message": "Disediakan oleh instans"
},
@@ -682,5 +703,20 @@
},
"search.filter.locked.server-loader.title": {
"message": "Pemuat disediakan oleh server"
},
"unknown-pack-warning-modal.dont-show-again": {
"message": "Jangan tampilkan peringatan ini lagi"
},
"unknown-pack-warning-modal.header": {
"message": "Konfirmasi pemasangan"
},
"unknown-pack-warning-modal.install-anyway": {
"message": "Tetap pasang"
},
"unknown-pack-warning-modal.warning.body": {
"message": "Kami tidak dapat menemukan berkas ini di Modrinth. Kami sangat menyarankan Anda untuk hanya memasang berkas dari sumber-sumber terpercaya."
},
"unknown-pack-warning-modal.warning.title": {
"message": "Peringatan berkas tidak dikenal"
}
}
+22 -1
View File
@@ -84,7 +84,7 @@
"message": "Decorazioni native"
},
"app.appearance-settings.select-option": {
"message": "Scegli una pagina"
"message": "Seleziona"
},
"app.appearance-settings.toggle-sidebar.description": {
"message": "Scegli se mostrare o nascondere la barra laterale."
@@ -611,6 +611,24 @@
"instance.settings.tabs.java": {
"message": "Java e memoria"
},
"instance.settings.tabs.java.custom-environment-variables": {
"message": "Variabili d'ambiente"
},
"instance.settings.tabs.java.custom-java-arguments": {
"message": "Argomenti JVM"
},
"instance.settings.tabs.java.custom-java-installation": {
"message": "Eseguibile di Java"
},
"instance.settings.tabs.java.custom-memory-allocation": {
"message": "Memoria allocata"
},
"instance.settings.tabs.java.enter-environment-variables": {
"message": "Inserisci le variabili d'ambiente..."
},
"instance.settings.tabs.java.enter-java-arguments": {
"message": "Inserisci gli argomenti JVM..."
},
"instance.settings.tabs.java.environment-variables": {
"message": "Variabili d'ambiente"
},
@@ -626,6 +644,9 @@
"instance.settings.tabs.java.java-memory": {
"message": "Memoria allocata"
},
"instance.settings.tabs.java.java-path-placeholder": {
"message": "/percorso/di/java"
},
"instance.settings.tabs.window": {
"message": "Finestra"
},
+24 -3
View File
@@ -24,7 +24,7 @@
"message": "실행 중인 인스턴스 보이기"
},
"app.action-bar.stop-instance": {
"message": "인스턴스 중지"
"message": "인스턴스 멈추기"
},
"app.action-bar.view-active-downloads": {
"message": "다운로드 목록 보기"
@@ -192,10 +192,10 @@
"message": "이 모드팩은 이미 <bold>{instanceName}</bold> 인스턴스에 설치되어 있습니다. 정말로 복제하시겠습니까?"
},
"app.instance.modpack-already-installed.create": {
"message": "생성"
"message": "만들기"
},
"app.instance.modpack-already-installed.header": {
"message": "모드팩 이미 설치"
"message": "이미 설치된 모드팩"
},
"app.instance.modpack-already-installed.instance": {
"message": "인스턴스"
@@ -611,6 +611,24 @@
"instance.settings.tabs.java": {
"message": "Java 및 메모리"
},
"instance.settings.tabs.java.custom-environment-variables": {
"message": "사용자 지정 환경 변수"
},
"instance.settings.tabs.java.custom-java-arguments": {
"message": "사용자 지정 Java 매개변수"
},
"instance.settings.tabs.java.custom-java-installation": {
"message": "사용자 지정 Java 설치"
},
"instance.settings.tabs.java.custom-memory-allocation": {
"message": "사용자 지정 메모리 할당"
},
"instance.settings.tabs.java.enter-environment-variables": {
"message": "환경 변수를 입력하세요..."
},
"instance.settings.tabs.java.enter-java-arguments": {
"message": "Java 인수를 입력하세요..."
},
"instance.settings.tabs.java.environment-variables": {
"message": "환경 변수"
},
@@ -626,6 +644,9 @@
"instance.settings.tabs.java.java-memory": {
"message": "할당된 메모리"
},
"instance.settings.tabs.java.java-path-placeholder": {
"message": "/path/to/java"
},
"instance.settings.tabs.window": {
"message": "창"
},
@@ -189,7 +189,7 @@
"message": "Verwijder instantie"
},
"app.instance.modpack-already-installed.body": {
"message": "Deze modpakket is al in de <bold>{instanceName}<bold> instantie geïnstalleerd. Ben je zeker dat je het geen wil dupliceren?"
"message": "Deze modpakket is al in de <bold>{instanceName}</bold> instantie geïnstalleerd. Ben je zeker dat je het geen wil dupliceren?"
},
"app.instance.modpack-already-installed.create": {
"message": "Maak"
@@ -611,6 +611,24 @@
"instance.settings.tabs.java": {
"message": "Java e memória"
},
"instance.settings.tabs.java.custom-environment-variables": {
"message": "Variáveis de ambiente personalizadas"
},
"instance.settings.tabs.java.custom-java-arguments": {
"message": "Argumentos Java personalizados"
},
"instance.settings.tabs.java.custom-java-installation": {
"message": "Instalação personalizada do Java"
},
"instance.settings.tabs.java.custom-memory-allocation": {
"message": "Alocação de memória personalizada"
},
"instance.settings.tabs.java.enter-environment-variables": {
"message": "Insira as variáveis de ambiente..."
},
"instance.settings.tabs.java.enter-java-arguments": {
"message": "Insira os argumentos Java..."
},
"instance.settings.tabs.java.environment-variables": {
"message": "Variáveis de ambiente"
},
@@ -626,6 +644,9 @@
"instance.settings.tabs.java.java-memory": {
"message": "Memória alocada"
},
"instance.settings.tabs.java.java-path-placeholder": {
"message": "/caminho/para/java"
},
"instance.settings.tabs.window": {
"message": "Janela"
},
+23 -2
View File
@@ -360,7 +360,7 @@
"message": "Доступно обновление"
},
"app.update.complete-toast.text": {
"message": "Нажмите здесь, чтобы посмотреть изменения."
"message": "Нажмите, чтобы посмотреть список изменений."
},
"app.update.complete-toast.title": {
"message": "Версия {version} успешно установлена!"
@@ -611,6 +611,24 @@
"instance.settings.tabs.java": {
"message": "Java и память"
},
"instance.settings.tabs.java.custom-environment-variables": {
"message": "Пользовательские настройки запуска"
},
"instance.settings.tabs.java.custom-java-arguments": {
"message": "Пользовательские аргументы Java"
},
"instance.settings.tabs.java.custom-java-installation": {
"message": "Пользовательская установка Java"
},
"instance.settings.tabs.java.custom-memory-allocation": {
"message": "Пользовательский объём памяти"
},
"instance.settings.tabs.java.enter-environment-variables": {
"message": "Введите дополнительные параметры системы..."
},
"instance.settings.tabs.java.enter-java-arguments": {
"message": "Введите аргументы Java..."
},
"instance.settings.tabs.java.environment-variables": {
"message": "Переменные среды"
},
@@ -626,6 +644,9 @@
"instance.settings.tabs.java.java-memory": {
"message": "Выделенная память"
},
"instance.settings.tabs.java.java-path-placeholder": {
"message": "/path/to/java"
},
"instance.settings.tabs.window": {
"message": "Окно"
},
@@ -741,7 +762,7 @@
"message": "Загрузчик управляется сервером"
},
"unknown-pack-warning-modal.body": {
"message": "Файлы любого формата проверены на безопасность, если они загружены на Modrinth (в том числе файлы .mrpack)."
"message": "Файл проверяется только в том случае, если он загружен на Modrinth, независимо от его формата (включая .mrpack)."
},
"unknown-pack-warning-modal.dont-show-again": {
"message": "Больше не предупреждать"
+23 -2
View File
@@ -168,7 +168,7 @@
"message": "Назва збірки"
},
"app.export-modal.select-files-label": {
"message": "Змінити які файли додані до експорту"
"message": "Змініть файли, які додані до експорту"
},
"app.export-modal.version-number-label": {
"message": "Номер версії"
@@ -222,7 +222,7 @@
"message": "Додати сервер"
},
"app.instance.worlds.browse-servers": {
"message": "Переглянути сервера"
"message": "Переглянути сервери"
},
"app.instance.worlds.delete-world-description": {
"message": "«{name}» буде **назавжди видалено** й у вас не буде можливости відновлення."
@@ -611,6 +611,24 @@
"instance.settings.tabs.java": {
"message": "Java та пам’ять"
},
"instance.settings.tabs.java.custom-environment-variables": {
"message": "Власні змінні середовища"
},
"instance.settings.tabs.java.custom-java-arguments": {
"message": "Власні аргументи Java"
},
"instance.settings.tabs.java.custom-java-installation": {
"message": "Власна інсталяція Java"
},
"instance.settings.tabs.java.custom-memory-allocation": {
"message": "Власний розподіл пам'яті"
},
"instance.settings.tabs.java.enter-environment-variables": {
"message": "Уведіть змінні середовища…"
},
"instance.settings.tabs.java.enter-java-arguments": {
"message": "Уведіть аргументи Java…"
},
"instance.settings.tabs.java.environment-variables": {
"message": "Змінні середовища"
},
@@ -626,6 +644,9 @@
"instance.settings.tabs.java.java-memory": {
"message": "Виділена пам’ять"
},
"instance.settings.tabs.java.java-path-placeholder": {
"message": "/шлях/до/java"
},
"instance.settings.tabs.window": {
"message": "Вікно"
},
@@ -1,10 +1,115 @@
{
"app.action-bar.downloading-java": {
"message": "Đang tải xuống Java {version}"
},
"app.action-bar.downloads": {
"message": "Tải xuống"
},
"app.action-bar.hide-more-running-instances": {
"message": "Đóng các phiên bản đang chạy"
},
"app.action-bar.make-primary-instance": {
"message": "Đặt làm bản instance chính"
},
"app.action-bar.no-instances-running": {
"message": "Không có phiên bản nào đang chạy"
},
"app.action-bar.offline": {
"message": "Ngoại tuyến"
},
"app.action-bar.primary-instance": {
"message": "Bản instance chính"
},
"app.action-bar.show-more-running-instances": {
"message": "Hiện thêm các phiên bản đang chạy"
},
"app.action-bar.stop-instance": {
"message": "Dừng instance"
},
"app.action-bar.view-active-downloads": {
"message": "Xem các lượt tải xuống"
},
"app.action-bar.view-instance": {
"message": "Xem phiên bản"
},
"app.action-bar.view-logs": {
"message": "Xem logs"
},
"app.appearance-settings.advanced-rendering.description": {
"message": "Kích hoạt các tính năng dựng hình nâng cao như hiệu ứng làm mờ, có thể gây giảm hiệu năng nếu không có chế độ tăng tốc phần cứng."
},
"app.appearance-settings.advanced-rendering.title": {
"message": "Dựng hình nâng cao"
},
"app.appearance-settings.color-theme.description": {
"message": "Chọn màu nền ưu thích của bạn cho Modrinth App."
},
"app.appearance-settings.color-theme.title": {
"message": "Màu chủ đề"
},
"app.appearance-settings.default-landing-page.description": {
"message": "Thay đổi trang hiển thị khi khởi chạy launcher."
},
"app.appearance-settings.default-landing-page.home": {
"message": "Trang chủ"
},
"app.appearance-settings.default-landing-page.library": {
"message": "Thư viện"
},
"app.appearance-settings.default-landing-page.title": {
"message": "Trang mặc định"
},
"app.appearance-settings.hide-nametag.description": {
"message": "Tắt hiển thị thẻ tên phía trên người chơi ở trang skin."
},
"app.appearance-settings.hide-nametag.title": {
"message": "Ẩn thẻ tên"
},
"app.appearance-settings.jump-back-into-worlds.description": {
"message": "Hiển thị các thế giới gần đây trong mục \"Tiếp tục chơi\" ở Trang chủ."
},
"app.appearance-settings.jump-back-into-worlds.title": {
"message": "Tiếp tục chơi"
},
"app.appearance-settings.minimize-launcher.description": {
"message": "Thu nhỏ launcher khi game Minecraft bắt đầu chạy."
},
"app.appearance-settings.minimize-launcher.title": {
"message": "Thu nhỏ launcher"
},
"app.appearance-settings.native-decorations.description": {
"message": "Sử dụng khung cửa sổ hệ thống (yêu cầu khởi động lại ứng dụng)."
},
"app.appearance-settings.native-decorations.title": {
"message": "Giao diện cửa sổ hệ thống"
},
"app.appearance-settings.select-option": {
"message": "Chọn một tuỳ chọn"
},
"app.appearance-settings.toggle-sidebar.description": {
"message": "Bật tính năng ẩn hiển thị thanh menu bên."
},
"app.appearance-settings.toggle-sidebar.title": {
"message": "Ẩn/hiện thanh bên"
},
"app.appearance-settings.unknown-pack-warning.description": {
"message": "Nếu bạn cố gắng cài đặt tệp Modrinth Pack (.mrpack) không được lưu trữ trên máy chủ Modrinth, chúng tôi sẽ đảm bảo bạn hiểu rõ các rủi ro trước khi cài đặt."
},
"app.appearance-settings.unknown-pack-warning.title": {
"message": "Cảnh báo tôi trước khi cài đặt các modpacks không rõ nguồn gốc"
},
"app.auth-servers.unreachable.body": {
"message": "Máy chủ xác thực của Minecraft có thể đang bị sập. Hãy kiểm tra kết nối Internet của bạn và thử lại sau."
},
"app.auth-servers.unreachable.header": {
"message": "Không thể kết nối đến máy chủ xác thực"
},
"app.browse.add-servers-to-instance": {
"message": "Thêm máy chủ vào phiên bản"
},
"app.browse.add-to-an-instance": {
"message": "Thêm vào phiên bản"
},
"app.browse.add-to-instance": {
"message": "Thêm vào hồ sơ"
},
@@ -17,12 +122,33 @@
"app.browse.already-added": {
"message": "Đã được thêm"
},
"app.browse.back-to-instance": {
"message": "Quay lại phiên bản"
},
"app.browse.discover-content": {
"message": "Khám phá nội dung"
},
"app.browse.discover-servers": {
"message": "Khám phá máy chủ"
},
"app.browse.hide-added-servers": {
"message": "Ẩn các server đã thêm"
},
"app.browse.project-type.modpacks": {
"message": "Modpack"
},
"app.browse.server-instance-content-warning": {
"message": "Thêm nội dung có thể gây lỗi tương thích khi tham gia máy chủ. Bất kỳ nội dung nào được thêm vào cũng sẽ bị mất khi bạn cập nhật nội dung của phiên bản máy chủ."
},
"app.browse.server.installing": {
"message": "Đang cài đặt"
},
"app.creation-modal.installing-modpack.description": {
"message": "{fileName}"
},
"app.creation-modal.installing-modpack.title": {
"message": "Đang cài đặt modpack..."
},
"app.export-modal.description-placeholder": {
"message": "Thêm miêu tả cho gói modpack..."
},
@@ -32,12 +158,18 @@
"app.export-modal.header": {
"message": "Xuất modpack"
},
"app.export-modal.include-file-accessibility-label": {
"message": "Bao gồm \"{file}\"?"
},
"app.export-modal.modpack-name-label": {
"message": "Tên modpack"
},
"app.export-modal.modpack-name-placeholder": {
"message": "Tên modpack"
},
"app.export-modal.select-files-label": {
"message": "Cấu hình các tệp nào được bao gồm trong quá trình xuất phiên bản này"
},
"app.export-modal.version-number-label": {
"message": "Phiên bản"
},
@@ -167,6 +299,15 @@
"app.modal.update-to-play.update-required-description": {
"message": "Bạn cần cập nhật {name} để có thể chơi. Vui lòng cập nhật lên bản mới nhất để khởi chạy trò chơi."
},
"app.project.install-button.already-installed": {
"message": "Dự án này đã được cài đặt"
},
"app.project.install-context.back-to-browse": {
"message": "Quay lại trang Khám Phá"
},
"app.project.install-context.install-content-to-instance": {
"message": "Cài đặt nội dung vào phiên bản"
},
"app.settings.developer-mode-enabled": {
"message": "Chế độ nhà phát triển đã được bật."
},
@@ -470,6 +611,24 @@
"instance.settings.tabs.java": {
"message": "Java và bộ nhớ"
},
"instance.settings.tabs.java.custom-environment-variables": {
"message": "Tùy chọn biến môi trường"
},
"instance.settings.tabs.java.custom-java-arguments": {
"message": "Tùy chỉnh tham số Java"
},
"instance.settings.tabs.java.custom-java-installation": {
"message": "Tùy chỉnh phiên bản cài đặt Java"
},
"instance.settings.tabs.java.custom-memory-allocation": {
"message": "Tùy chỉnh phân bổ bộ nhớ"
},
"instance.settings.tabs.java.enter-environment-variables": {
"message": "Nhập biến môi trường..."
},
"instance.settings.tabs.java.enter-java-arguments": {
"message": "Nhập tham số Java..."
},
"instance.settings.tabs.java.environment-variables": {
"message": "Biến môi trường"
},
@@ -485,6 +644,9 @@
"instance.settings.tabs.java.java-memory": {
"message": "Bộ nhớ phân bổ"
},
"instance.settings.tabs.java.java-path-placeholder": {
"message": "/đường_dẫn/tới/java"
},
"instance.settings.tabs.window": {
"message": "Cửa sổ"
},
@@ -557,6 +719,24 @@
"instance.worlds.world_in_use": {
"message": "Thế giới đang mở"
},
"minecraft-account.add-account": {
"message": "Thêm tài khoản"
},
"minecraft-account.label": {
"message": "Tài khoản Minecraft"
},
"minecraft-account.not-signed-in": {
"message": "Chưa đăng nhập"
},
"minecraft-account.remove-account": {
"message": "Xoá tài khoản"
},
"minecraft-account.select-account": {
"message": "Chọn tài khoản"
},
"minecraft-account.sign-in": {
"message": "Đăng nhập vào Minecraft"
},
"search.filter.locked.instance": {
"message": "Được cung cấp bởi phiên bản"
},
@@ -580,5 +760,26 @@
},
"search.filter.locked.server-loader.title": {
"message": "Loader được cung cấp bởi máy chủ"
},
"unknown-pack-warning-modal.body": {
"message": "Tệp chỉ được xem xét nếu nó được tải lên Modrinth, bất kể định dạng tệp của nó là gì (bao gồm cả .mrpack)."
},
"unknown-pack-warning-modal.dont-show-again": {
"message": "Đừng hiển thị cảnh báo này nữa"
},
"unknown-pack-warning-modal.header": {
"message": "Xác nhận cài đặt"
},
"unknown-pack-warning-modal.install-anyway": {
"message": "Tiếp tục cài đặt"
},
"unknown-pack-warning-modal.malware-statement": {
"message": "Phần mềm độc hại thường được phát tán thông qua các tệp modpack bằng cách chia sẻ chúng trên các nền tảng như Discord."
},
"unknown-pack-warning-modal.warning.body": {
"message": "Chúng tôi không tìm thấy tập tin này trên Modrinth. Chúng tôi đặc biệt khuyên bạn chỉ nên cài đặt các tập tin từ các nguồn đáng tin cậy."
},
"unknown-pack-warning-modal.warning.title": {
"message": "Cảnh báo tệp không xác định"
}
}
@@ -63,7 +63,7 @@
"message": "在皮肤页面中禁用你玩家头顶上的名牌。"
},
"app.appearance-settings.hide-nametag.title": {
"message": "隐藏名"
"message": "隐藏名称标签"
},
"app.appearance-settings.jump-back-into-worlds.description": {
"message": "在主页的“快速回到”部分包含最近的世界。"
+28 -4
View File
@@ -147,10 +147,10 @@
"message": "{fileName}"
},
"app.creation-modal.installing-modpack.title": {
"message": "正在安裝模組包..."
"message": "正在安裝模組包……"
},
"app.export-modal.description-placeholder": {
"message": "輸入模組包描述..."
"message": "輸入模組包描述……"
},
"app.export-modal.export-button": {
"message": "匯出"
@@ -252,13 +252,13 @@
"message": "「{name}」將從你的清單中移除(包含遊戲內),且無法還原。"
},
"app.instance.worlds.remove-server-description-with-address": {
"message": "「{name}」({address}) 將從你的清單中移除包含遊戲內),且無法還原。"
"message": "「{name}」({address}) 將從你的清單中移除(包含遊戲內),且無法還原。"
},
"app.instance.worlds.remove-server-title": {
"message": "確定要移除「{name}」嗎?"
},
"app.instance.worlds.search-worlds-placeholder": {
"message": "搜尋 {count} 個世界..."
"message": "搜尋 {count} 個世界……"
},
"app.instance.worlds.this-server": {
"message": "這個伺服器"
@@ -302,6 +302,9 @@
"app.project.install-button.already-installed": {
"message": "這個專案已安裝"
},
"app.project.install-context.back-to-browse": {
"message": "返回瀏覽"
},
"app.project.install-context.install-content-to-instance": {
"message": "將內容安裝至實例"
},
@@ -608,6 +611,24 @@
"instance.settings.tabs.java": {
"message": "Java 和記憶體"
},
"instance.settings.tabs.java.custom-environment-variables": {
"message": "自訂環境變數"
},
"instance.settings.tabs.java.custom-java-arguments": {
"message": "自訂 Java 參數"
},
"instance.settings.tabs.java.custom-java-installation": {
"message": "自訂 Java 安裝"
},
"instance.settings.tabs.java.custom-memory-allocation": {
"message": "自訂記憶體分配"
},
"instance.settings.tabs.java.enter-environment-variables": {
"message": "輸入環境變數……"
},
"instance.settings.tabs.java.enter-java-arguments": {
"message": "輸入 Java 參數……"
},
"instance.settings.tabs.java.environment-variables": {
"message": "環境變數"
},
@@ -623,6 +644,9 @@
"instance.settings.tabs.java.java-memory": {
"message": "記憶體配置"
},
"instance.settings.tabs.java.java-path-placeholder": {
"message": "/path/to/java"
},
"instance.settings.tabs.window": {
"message": "視窗"
},
@@ -77,7 +77,7 @@ function buildLogList(rawLogs) {
log.filename !== 'latest_stdout.log' &&
log.filename !== 'latest_stdout' &&
log.filename !== 'launcher_log.txt' &&
log.stdout !== '' &&
(log.output == null || log.output !== '') &&
(log.filename.includes('.log') || log.filename.endsWith('.txt')),
)
.map((log) => ({
@@ -5,7 +5,6 @@ import {
commonMessages,
defineMessages,
IntlFormatted,
normalizeChildren,
PagewideBanner,
useVIntl,
} from '@modrinth/ui'
@@ -22,7 +21,7 @@ const messages = defineMessages({
},
description: {
id: 'layout.banner.preview.description',
defaultMessage: `If you meant to access the official Modrinth website, visit {url}. This preview deploy is used by Modrinth staff for testing purposes. It was built using <branch-link>{owner}/{branch}</branch-link> @ {commit}.`,
defaultMessage: `If you meant to access the official Modrinth website, visit {url}. This preview deploy is used by Modrinth staff for testing purposes. It was built using {ref}.`,
},
})
@@ -41,30 +40,22 @@ const url = computed(() => `https://modrinth.com${route.fullPath}`)
</template>
<template #description>
<span>
<IntlFormatted
:message-id="messages.description"
:values="{
owner: config.public.owner,
branch: config.public.branch,
}"
>
<IntlFormatted :message-id="messages.description">
<template #url>
<a :href="url" target="_blank" rel="noopener" class="text-link">
{{ url }}
</a>
</template>
<template #branch-link="{ children }">
<template #ref>
<a
:href="`https://github.com/${config.public.owner}/code/tree/${config.public.branch}`"
target="_blank"
rel="noopener"
class="hover:underline"
>
<component :is="() => normalizeChildren(children)" />
{{ config.public.owner }} / {{ config.public.branch }}
</a>
</template>
<template #commit>
<span v-if="config.public.hash === 'unknown'">unknown</span>
@ <span v-if="config.public.hash === 'unknown'">unknown</span>
<a
v-else
:href="`https://github.com/${config.public.owner}/code/commit/${config.public.hash}`"
@@ -872,6 +872,7 @@ function notifySkippedQueueProjects(count: number) {
title: 'Skipped projects',
text: `Skipped ${count} project(s) already moderated or locked by others.`,
type: 'info',
autoCloseMs: 2000,
})
}
@@ -1284,40 +1285,15 @@ onMounted(async () => {
notifications.setNotificationLocation('left')
if (projectV2.value.status !== 'processing') {
if (moderationQueue.isQueueMode && moderationQueue.queueLength > 1) {
addNotification({
title: 'Project already moderated',
text: 'Skipping to the next project in the queue.',
type: 'info',
})
await skipToNextProject()
return
}
alreadyReviewed.value = true
return
}
// Try to acquire lock
const result = await moderationQueue.acquireLock(projectV2.value.id)
if (result.success) {
handleLockAcquired()
} else if (result.locked_by) {
// Actually locked by another moderator
// In queue mode with more projects - auto-skip to next project
if (moderationQueue.isQueueMode && moderationQueue.queueLength > 1) {
addNotification({
title: 'Project locked',
text: `Skipped project locked by @${result.locked_by.username}.`,
type: 'info',
})
// skipToNextProject already calls completeCurrentProject
await skipToNextProject()
return
}
// Single project mode or last in queue - show locked UI
lockStatus.value = {
locked: true,
lockedBy: result.locked_by,
+38 -19
View File
@@ -1,3 +1,10 @@
function normalizeAuthToken(value) {
if (typeof value === 'string') {
return value
}
return ''
}
export const useAuth = async (oldToken = null) => {
const auth = useState('auth', () => ({
user: null,
@@ -32,27 +39,35 @@ export const initAuth = async (oldToken = null) => {
})
if (oldToken) {
authCookie.value = oldToken
const normalized = normalizeAuthToken(oldToken)
if (normalized) {
authCookie.value = normalized
}
}
if (route.query.code && !route.fullPath.includes('new_account=true')) {
authCookie.value = route.query.code
const oauthCode = normalizeAuthToken(route.query.code)
if (oauthCode && !route.fullPath.includes('new_account=true')) {
authCookie.value = oauthCode
}
if (route.fullPath.includes('new_account=true') && route.path !== '/auth/welcome') {
const redirect = route.path.startsWith('/auth/') ? null : route.fullPath
await navigateTo(
`/auth/welcome?authToken=${route.query.code}${
`/auth/welcome?authToken=${oauthCode}${
redirect ? `&redirect=${encodeURIComponent(redirect)}` : ''
}`,
)
}
if (authCookie.value) {
auth.token = authCookie.value
const tokenStr = normalizeAuthToken(authCookie.value)
if (!auth.token || !auth.token.startsWith('mra_')) {
if (authCookie.value != null && tokenStr === '') {
authCookie.value = null
} else if (tokenStr) {
auth.token = tokenStr
if (!auth.token.startsWith('mra_')) {
return auth
}
@@ -71,7 +86,7 @@ export const initAuth = async (oldToken = null) => {
}
}
if (!auth.user && auth.token) {
if (!auth.user && auth.token && typeof auth.token === 'string') {
try {
const session = await useBaseFetch(
'session/refresh',
@@ -84,18 +99,22 @@ export const initAuth = async (oldToken = null) => {
true,
)
auth.token = session.session
authCookie.value = auth.token
auth.user = await useBaseFetch(
'user',
{
headers: {
Authorization: auth.token,
auth.token = normalizeAuthToken(session.session)
if (auth.token) {
authCookie.value = auth.token
auth.user = await useBaseFetch(
'user',
{
headers: {
Authorization: auth.token,
},
},
},
true,
)
true,
)
} else {
authCookie.value = null
auth.token = ''
}
} catch {
authCookie.value = null
}
@@ -63,7 +63,11 @@ export function useCdnDownloadContext() {
})
function createProjectDownloadUrl(originalUrl: string, context?: DownloadContext): string {
if (!originalUrl.startsWith('https://cdn.modrinth.com')) {
if (
typeof originalUrl !== 'string' ||
!originalUrl ||
!originalUrl.startsWith('https://cdn.modrinth.com')
) {
return originalUrl
}
+1 -1
View File
@@ -942,7 +942,7 @@
"message": "موعد"
},
"dashboard.withdraw.completion.email-confirmation": {
"message": "ستتلقى رسالة بريد إلكتروني في <b>{email}<b> مع تعليمات لاسترداد المبلغ المسحوب. "
"message": "ستتلقى رسالة بريد إلكتروني في <b>{email}</b> مع تعليمات لاسترداد المبلغ المسحوب. "
},
"dashboard.withdraw.completion.exchange-rate": {
"message": "سعر الصرف "
+156
View File
@@ -107,6 +107,9 @@
"app-marketing.features.performance.cpu-percent": {
"message": "% CPU"
},
"app-marketing.features.performance.description": {
"message": "Aplikace Modrinth je výkonnější než mnoho předních správců modů a využívá pouze 150MB paměti RAM!"
},
"app-marketing.features.performance.discord": {
"message": "Discord"
},
@@ -401,6 +404,48 @@
"collection.title": {
"message": "{name} - Kolekce"
},
"conversation-thread.action.add-private-note": {
"message": "Přidat soukromou poznámku"
},
"conversation-thread.action.close-thread": {
"message": "Uzavřít vlákno"
},
"conversation-thread.action.close-with-reply": {
"message": "Uzavřít s odpovědí"
},
"conversation-thread.action.reject": {
"message": "Zamítnout"
},
"conversation-thread.action.reject-with-reply": {
"message": "Zamítnout s odpovědí"
},
"conversation-thread.action.reopen-thread": {
"message": "Znovuotevřít vlákno"
},
"conversation-thread.action.reply": {
"message": "Odpovědět"
},
"conversation-thread.action.reply-to-thread": {
"message": "Odpovědět vláknu"
},
"conversation-thread.action.send": {
"message": "Odeslat"
},
"conversation-thread.action.send-to-review": {
"message": "Odeslat ke kontrole"
},
"conversation-thread.action.send-to-review-with-reply": {
"message": "Odeslat ke kontrole s odpovědí"
},
"conversation-thread.reply-editor.placeholder.reply": {
"message": "Odpovědět vláknu..."
},
"conversation-thread.reply-editor.placeholder.send": {
"message": "Odeslat zprávu..."
},
"conversation-thread.reply-modal.header": {
"message": "Odpovědět vláknu"
},
"create-project-version.create-modal.stage.add-files.admonition": {
"message": "Doplňkové soubory slouží jako podpůrné materiály (např. zdrojový kód), ne jako alternativní verze či varianty."
},
@@ -497,6 +542,9 @@
"create.project.name-placeholder": {
"message": "Zadejte název projektu..."
},
"create.project.owner-label": {
"message": "Vlastník"
},
"create.project.summary-description": {
"message": "Popiště vaši organizace dvěma nebo jednou větou."
},
@@ -548,9 +596,18 @@
"dashboard.affiliate-links.revoke-confirm.title": {
"message": "Jste si jistý, že chcete zrušit svůj affiliate odkaz „{title}“?"
},
"dashboard.analytics.total-downloads": {
"message": "Celková stažení"
},
"dashboard.analytics.total-followers": {
"message": "Celkoví sledující"
},
"dashboard.collections.button.create-new": {
"message": "Vytvořit novou"
},
"dashboard.collections.empty.get-started-hint": {
"message": "Vytvořte svou první kolekci a začněte!"
},
"dashboard.collections.label.projects-count": {
"message": "{count} {countPlural, plural, one {project} other {projects}}"
},
@@ -560,6 +617,15 @@
"dashboard.collections.long-title": {
"message": "Vaše kolekce"
},
"dashboard.collections.sort.name-ascending": {
"message": "Jméno (A-Z)"
},
"dashboard.collections.sort.recently-created": {
"message": "Nedávno vytvořeno"
},
"dashboard.collections.sort.recently-updated": {
"message": "Nedávno aktualizováno"
},
"dashboard.creator-tax-form-modal.confirmation.title": {
"message": "Hotovo! 🎉"
},
@@ -575,9 +641,18 @@
"dashboard.creator-withdraw-modal.details-label": {
"message": "Detaily"
},
"dashboard.creator-withdraw-modal.fee-breakdown-amount": {
"message": "Množství"
},
"dashboard.creator-withdraw-modal.fee-breakdown-fee": {
"message": "Poplatek"
},
"dashboard.creator-withdraw-modal.fee-breakdown-gift-card-value": {
"message": "Hodnota dárkové karty"
},
"dashboard.creator-withdraw-modal.fee-breakdown-usd-equivalent": {
"message": "Ekvivalent americkému dolaru"
},
"dashboard.creator-withdraw-modal.method-selection.country-placeholder": {
"message": "Zvolte vaši zemi"
},
@@ -626,9 +701,18 @@
"dashboard.creator-withdraw-modal.stage.tax-form": {
"message": ""
},
"dashboard.creator-withdraw-modal.tremendous-details.enter-denomination-placeholder": {
"message": "Zadejte množství"
},
"dashboard.creator-withdraw-modal.tremendous-details.payment-method": {
"message": "Platební metoda"
},
"dashboard.creator-withdraw-modal.tremendous-details.reward": {
"message": "Odměna"
},
"dashboard.creator-withdraw-modal.tremendous-details.reward-placeholder": {
"message": "Vyberte odměnu"
},
"dashboard.creator-withdraw-modal.tremendous-details.reward-plural": {
"message": "Odměny"
},
@@ -638,9 +722,57 @@
"dashboard.creator-withdraw-modal.withdraw-limit-used": {
"message": "Vyčerpali jste svůj limit pro výběr <b>{withdrawLimit}</b>. Pro vyšší výběr musíte vyplnit daňový formulář."
},
"dashboard.organizations.button.create": {
"message": "Vytvořit organizaci"
},
"dashboard.organizations.empty.cta": {
"message": "Vytvořte organizaci!"
},
"dashboard.organizations.error.fetch": {
"message": "Nepodařilo se načíst organizace"
},
"dashboard.overview.notifications.button.mark-all-as-read": {
"message": "Označit vše jako přečtené"
},
"dashboard.overview.notifications.button.view-history": {
"message": "Ukázat historii"
},
"dashboard.overview.notifications.history.label": {
"message": "Historie"
},
"dashboard.overview.notifications.history.title": {
"message": "Historie oznámení"
},
"dashboard.overview.notifications.loading": {
"message": "Načítání oznámení..."
},
"dashboard.projects.head-title": {
"message": "Projekty"
},
"dashboard.projects.links.discord-invite.label": {
"message": "Discord pozvánka"
},
"dashboard.projects.links.placeholder.valid-url": {
"message": "Zadejte platnou URL"
},
"dashboard.projects.sort.option.name": {
"message": "Jméno"
},
"dashboard.projects.sort.option.status": {
"message": "Stav"
},
"dashboard.projects.table.name": {
"message": "Jméno"
},
"dashboard.projects.table.status": {
"message": "Stav"
},
"dashboard.revenue.available-now": {
"message": "K dispozici nyní"
},
"dashboard.revenue.balance": {
"message": "Zůstatek"
},
"dashboard.revenue.estimated-with-date": {
"message": "Odhadováno {date}"
},
@@ -650,18 +782,39 @@
"dashboard.revenue.transactions.btn.download-csv": {
"message": "Stáhnout jako CSV"
},
"dashboard.sidebar.label.creators": {
"message": "Tvůrci"
},
"dashboard.sidebar.label.notifications": {
"message": "Oznámení"
},
"dashboard.sidebar.label.organizations": {
"message": "Organizace"
},
"dashboard.sidebar.label.projects": {
"message": "Projekty"
},
"dashboard.withdraw.completion.account": {
"message": "Účet"
},
"dashboard.withdraw.completion.amount": {
"message": "Množství"
},
"dashboard.withdraw.completion.date": {
"message": "Datum"
},
"dashboard.withdraw.completion.fee": {
"message": "Poplatek"
},
"dashboard.withdraw.completion.transactions-button": {
"message": "Transakce"
},
"dashboard.withdraw.completion.wallet": {
"message": "Peněženka"
},
"discover.install.back-to-server": {
"message": "Zpět na server"
},
"error.collection.404.list_item.1": {
"message": "Možná jste zadali URL adresu kolekce špatně."
},
@@ -752,6 +905,9 @@
"frog.title": {
"message": "Žába"
},
"hosting-marketing.included.custom-url": {
"message": "Vlastní URL"
},
"landing.creator.feature.monetization.title": {
"message": "Monetizace"
},
@@ -1013,9 +1013,6 @@
"hosting-marketing.faq.location": {
"message": "Hvor er Modrinth Hosting servere placeret? Kan jeg vælge et område?"
},
"hosting-marketing.faq.location.answer": {
"message": "Vi har servere tilgængelig i Nord Amerika, Europa, og Sydøst Asien på nuværende tidspunkt som du kan vælge imellem under købet. Flere områder kommer i fremtiden! Hvis du gerne vil skifte til dit område, venligst kontakt support."
},
"hosting-marketing.faq.versions-loaders": {
"message": "Hvilken Minecraft version og loaders kan blive brugt?"
},
@@ -1469,9 +1469,6 @@
"hosting-marketing.faq.location": {
"message": "Wo befinden sich Server von Modrinth Hosting? Kann ich eine Region auswählen?"
},
"hosting-marketing.faq.location.answer": {
"message": "Derzeit sind Server in Nordamerika, Europa und Südostasien verfügbar, die du beim Kauf auswählen kannst. Weitere Regionen werden in Zukunft dazukommen! Falls du deine Region wechseln möchtest, wende dich bitte an den Support."
},
"hosting-marketing.faq.versions-loaders": {
"message": "Welche Minecraft-Versionen und Loader können verwendet werden?"
},
@@ -1469,9 +1469,6 @@
"hosting-marketing.faq.location": {
"message": "Wo befinden sich Server von Modrinth Hosting? Kann ich eine Region auswählen?"
},
"hosting-marketing.faq.location.answer": {
"message": "Derzeit sind Server in Nordamerika, Europa und Südostasien verfügbar, die du beim Kauf auswählen kannst. Weitere Regionen werden in Zukunft dazukommen! Falls du deine Region wechseln möchtest, wende dich bitte an den Support."
},
"hosting-marketing.faq.versions-loaders": {
"message": "Welche Minecraft-Versionen und Loader können verwendet werden?"
},
+1 -1
View File
@@ -1881,7 +1881,7 @@
"message": "Error generating state from API when building."
},
"layout.banner.preview.description": {
"message": "If you meant to access the official Modrinth website, visit {url}. This preview deploy is used by Modrinth staff for testing purposes. It was built using <branch-link>{owner}/{branch}</branch-link> @ {commit}."
"message": "If you meant to access the official Modrinth website, visit {url}. This preview deploy is used by Modrinth staff for testing purposes. It was built using {ref}."
},
"layout.banner.preview.title": {
"message": "This is a preview deploy of the Modrinth website."
+111 -6
View File
@@ -42,7 +42,7 @@
"message": "Al descargar la Modrinth App, aceptas nuestros <terms-link>Términos</terms-link> y <privacy-link>Política de Privacidad</privacy-link>."
},
"app-marketing.download.title": {
"message": "Descargar la Modrinth App (Beta)"
"message": "Descarga Modrinth App (Beta)"
},
"app-marketing.download.windows": {
"message": "Windows"
@@ -497,6 +497,27 @@
"conversation-thread.reply-modal.help-center-note": {
"message": "Si necesitas ponerte en contacto con el equipo de moderación, por favor utiliza el <help-center-link>Centro de ayuda de Modrinth</help-center-link> y haz clic en la burbuja azúl en la esquina inferior derecha para contactar soporte."
},
"conversation-thread.resubmit-modal.confirmation.description": {
"message": "Confirma que has atendido las observaciones de los moderadores"
},
"conversation-thread.resubmit-modal.confirmation.label": {
"message": "Confirmo que he atendido correctamente las observaciones de los moderadores."
},
"conversation-thread.resubmit-modal.description": {
"message": "Estás enviando <project-title>{projectTitle}</project-title> para ser revisado de nuevo por los moderadores."
},
"conversation-thread.resubmit-modal.header.resubmitting": {
"message": "Enviando de nuevo para revisión"
},
"conversation-thread.resubmit-modal.header.submitting": {
"message": "Enviando para revisión"
},
"conversation-thread.resubmit-modal.reminder": {
"message": "Asegúrate de haber leído y resuelto todas las observaciones del equipo de moderación."
},
"conversation-thread.resubmit-modal.warning": {
"message": "Envíos repetidos sin atender las observaciones de los moderadores pueden resultar en la suspensión de la cuenta."
},
"create-project-version.create-modal.stage.add-files.admonition": {
"message": "Los archivos complementarios sirven para recursos de apoyo, como código fuente, no para versiones o variantes alternativas."
},
@@ -965,6 +986,9 @@
"dashboard.head-title": {
"message": "Panel de control"
},
"dashboard.notifications.empty.no-unread": {
"message": "No tienes notificaciones sin leer."
},
"dashboard.notifications.link.see-all": {
"message": "Ver todas"
},
@@ -995,6 +1019,9 @@
"dashboard.overview.notifications.button.view-history": {
"message": "Ver historial"
},
"dashboard.overview.notifications.empty.no-unread": {
"message": "No tienes notificaciones sin leer."
},
"dashboard.overview.notifications.error.loading": {
"message": "Error cargando notificaciones:"
},
@@ -1335,13 +1362,13 @@
"message": "Seleccionando modpack para instalar antes del reinicio"
},
"discover.seo.description": {
"message": "Busca y navega miles de Minecraft {projectType, select, mod {mods} modpack {modpacks} packs de recursos {resource packs} shader {shaders} plugin {plugins} datapack {datapacks} other {projects}} en Modrinth con resultados de busqueda instantáneos y precisos. Nuestros filtradores te ayudan a encontrar rápidamente lo mejor de Minecraft {projectType, select, mod {mods} modpack {modpacks} packs de recursos {resource packs} shader {shaders} plugin {plugins} datapack {datapacks} other {projects}}."
"message": "Busca y navega miles de {projectType, select, mod {mods} modpack {modpacks} resourcepack {packs de recursos} shader {shaders} plugin {plugins} datapack {datapacks} other {proyectos}} para Minecraft en Modrinth con resultados de busqueda instantáneos y precisos. Nuestros filtradores te ayudan a encontrar rápidamente los mejores {projectType, select, mod {mods} modpack {modpacks} resourcepack {packs de recursos} shader {shaders} plugin {plugins} datapack {datapacks} other {projects}} para Minecraft."
},
"discover.seo.title": {
"message": "Buscar {projectType, select, mod {mods} modpack {modpacks} packs de recursos {resource packs} shader {shaders} plugin {plugins} datapack {datapacks} other {projects}"
"message": "Buscar {projectType, select, mod {mods} modpack {modpacks} resourcepack {paquetes de recursos} shader {shaders} plugin {plugins} datapack {datapacks} other {projects}}"
},
"discover.seo.title-with-query": {
"message": "Buscar {projectType, select, mod {mods} modpack {modpacks} packs de recursos {resource packs} shader {shaders} plugin {plugins} datapack {datapacks} other {projects} | {query}"
"message": "Buscar {projectType, select, mod {mods} modpack {modpacks} resourcepack {paquetes de recursos} shader {shaders} plugin {plugins} datapack {datapacks} other {projects}} | {query}"
},
"error.collection.404.list_item.1": {
"message": "Puede que hayas escrito mal la URL de la colección."
@@ -1509,7 +1536,7 @@
"message": "¿Dónde se encuentran los servidores de Modrinth Hosting? ¿Puedo elegir una región?"
},
"hosting-marketing.faq.location.answer": {
"message": "Actualmente disponemos de servidores en Norteamérica, Europa y el Sudeste Asiático entre los que puede elegir al realizar la compra. ¡En el futuro añadiremos más regiones! Si deseas cambiar de región, ponte en contacto con soporte."
"message": "Tenemos servidores disponibles a través de Norteamérica, Europa y el sudeste asiático que puedes seleccionar en el momento de tu compra. ¡Más regiones en el futuro! Si deseas cambiar tu región, por favor contacta con soporte."
},
"hosting-marketing.faq.versions-loaders": {
"message": "¿Qué versiones y loaders de Minecraft se pueden utilizar?"
@@ -1853,6 +1880,9 @@
"layout.banner.build-fail.title": {
"message": "Error al generar el estado desde la API durante la compilación."
},
"layout.banner.preview.description": {
"message": "Si buscas acceder al sitio oficial de Modrinth visita {url}. Este sitio de previsualización es usado por el staff de Modrinth para fines de pruebas. Fue creado usando <branch-link>{owner}/{branch}</branch-link> @{commit}."
},
"layout.banner.preview.title": {
"message": "Esta es una vista previa de la implementación del sitio web de Modrinth."
},
@@ -2681,6 +2711,81 @@
"project.license.title": {
"message": "Licencia"
},
"project.moderation.admonition.approved.body.private": {
"message": "Tu proyecto es privado, lo que significa que solo pueden acceder tú y las personas a las que invites."
},
"project.moderation.admonition.approved.body.public": {
"message": "Tu proyecto está publicado y aparece en las búsquedas de Modrinth."
},
"project.moderation.admonition.approved.body.unlisted": {
"message": "Tu proyecto no está listado, lo que significa que solo se puede acceder a él a través de un link directo y no aparece en las búsquedas de Modrinth."
},
"project.moderation.admonition.approved.body.visibility-message": {
"message": "Puedes cambiar la visibilidad de tu proyecto en la <visibility-settings-link>configuración de visibilidad</visibility-settings-link> de tu proyecto."
},
"project.moderation.admonition.approved.header": {
"message": "Proyecto aprobado"
},
"project.moderation.admonition.draft.body": {
"message": "Este es un borrador de tu proyecto que nadie puede ver hasta que sea enviado para ser revisado y aprobado por el equipo de moderación de Modrinth."
},
"project.moderation.admonition.draft.header": {
"message": "Borrador"
},
"project.moderation.admonition.draft.submit-for-review": {
"message": "Una vez que hayas completado todos los pasos necesarios y te hayas asegurado de que tu proyecto cumple con las <rules-link>Reglas de contenido</rules-link> de Modrinth, puedes enviar tu proyecto a revisión."
},
"project.moderation.admonition.rejected.address-all-concerns": {
"message": "Por favor resuelve todas las observaciones de moderación, incluyendo cualquiera listada abajo, antes de enviar de nuevo el proyecto."
},
"project.moderation.admonition.rejected.header": {
"message": "Cambios solicitados"
},
"project.moderation.admonition.rejected.spam-notice": {
"message": "Enviar en repetidas ocasiones tu proyecto sin atender antes todas las observaciones de moderación puede resultar en la suspensión de la cuenta."
},
"project.moderation.admonition.under-review.body.1": {
"message": "Tu proyecto está en lista de espera para ser revisado por el equipo de moderación de Modrinth."
},
"project.moderation.admonition.under-review.body.2": {
"message": "Tu proyecto será escaneado y después revisado por moderadores humanos para asegurarnos de que esté de acuerdo con las <rules-link>Reglas de contenido</rules-link> y los <terms-link>Términos de uso</terms-link> de Modrinth."
},
"project.moderation.admonition.under-review.body.3": {
"message": "Aún puedes modificar tu proyecto, no afectará tu posición en la cola."
},
"project.moderation.admonition.under-review.body.4": {
"message": "Buscamos revisar envíos en un plazo de 24-48 horas, pero algunos proyectos pueden sufrir retrasos. Esto no indica ningún problema con tu envío."
},
"project.moderation.admonition.under-review.body.5": {
"message": "<emphasis>¡Apreciamos tu paciencia mientras nuestros moderadores trabajan duro para mantener Modrinth seguro y estaremos encantados de poder ayudarte a compartir tu contenido! 💚</emphasis>"
},
"project.moderation.admonition.under-review.header": {
"message": "Proyecto bajo revisión"
},
"project.moderation.admonition.withheld.body": {
"message": "Tu proyecto no aparecerá públicamente y solo se podrá acceder a él por un enlace directo.{requestedStatus, select,unlisted { Según tu <visibility-settings-link>configuración de visibilidad</visibility-settings-link>, es muy probable que no se necesite ninguna acción adicional.} other { Por favor resuelve todas las observaciones de moderación, incluyendo las listadas abajo, antes de enviar de nuevo el proyecto.}}"
},
"project.moderation.admonition.withheld.header": {
"message": "Deslistado por el staff"
},
"project.moderation.error.unauthorized": {
"message": "Sin autorización"
},
"project.moderation.thread.approved-warning": {
"message": "Este hilo no esta siendo monitorizado de manera activa, pero puede ser revisado para más información sobre tu proyecto de ser necesario."
},
"project.moderation.thread.help-center-note.1": {
"message": "Los moderadores de contenido no pueden dar soporte a la mayoría de los problemas y los mensajes de este hilo no notifican al staff."
},
"project.moderation.thread.help-center-note.2": {
"message": "Si necesitas ayuda o tienes consultas adicionales, por favor visita el <help-center-link>Centro de ayuda de Modrinth</help-center-link> y haz click en la burbuja azúl para contactar con soporte."
},
"project.moderation.thread.moderator-see-user-ui-toggle": {
"message": "Mostrar vista de miembro"
},
"project.moderation.thread.private-description": {
"message": "Este es un hilo de conversación con los moderadores de Modrinth. Podrían enviarte un mensaje con observaciones relacionadas a este proyecto."
},
"project.moderation.thread.title": {
"message": "Mensajes de moredación"
},
@@ -3684,7 +3789,7 @@
"message": "Error al renovar la suscripción"
},
"settings.billing.pyro.resubscribe.request-submitted.text": {
"message": "Si el servidor se encuentra cancelado, puede tomar 10-15 minutos en preparar el servidor"
"message": "Si el servidor se encuentra cancelado, puede tomar de 10 a 15 minutos en preparar el servidor."
},
"settings.billing.pyro.resubscribe.request-submitted.title": {
"message": "Solicitud de renovación de suscripción enviada"
@@ -1367,9 +1367,6 @@
"hosting-marketing.faq.location": {
"message": "¿Dónde están localizados los servidores de Modrinth Hosting? ¿Puedo elegir la región?"
},
"hosting-marketing.faq.location.answer": {
"message": "Tenemos servidores disponibles en América del Norte, Europa y Sureste de Asia por el momento, que puedes elegir al momento de comprarlo. ¡Más regiones estarán disponibles en el futuro! Si te gustaría cambiar tu región por favor contáctate con soporte."
},
"hosting-marketing.faq.versions-loaders": {
"message": "¿Que versiones de Minecraft y loaders se pueden usar?"
},
+336
View File
@@ -191,9 +191,21 @@
"app-marketing.hero.download-modrinth-app-for-os": {
"message": "Lataa Modrinth App alustalle {os}"
},
"app-marketing.hero.minecraft-screenshot-alt": {
"message": "Kuvakaappaus Cobblemon instanssin pää valikko näytöstä."
},
"app-marketing.hero.more-download-options": {
"message": "Lisää lataus vaihtoehtoja"
},
"app-marketing.hide-other-packages": {
"message": "Piilota muut paketit"
},
"app-marketing.not-recommended": {
"message": "Emme suosittele että käytät näitä ellet tiedä mitä teet."
},
"app-marketing.show-other-packages": {
"message": "Näytä muut paketit"
},
"auth.authorize.action.authorize": {
"message": "Valtuuta"
},
@@ -335,36 +347,171 @@
"collection.button.edit-icon": {
"message": "Muokkaa kuvaketta"
},
"collection.button.remove-icon": {
"message": "Poista kuvake"
},
"collection.button.remove-project": {
"message": "Poista projekti"
},
"collection.button.replace-icon": {
"message": "Korvaa kuvake"
},
"collection.button.select-icon": {
"message": "Valitse kuvake"
},
"collection.button.unfollow-project": {
"message": "Lopeta projektin seuraaminen"
},
"collection.delete-modal.description": {
"message": "Tämä poistaa pysyvästi tämän kokoelman. Tätä toimea ei voida peruuttaa."
},
"collection.delete-modal.title": {
"message": "Oletko varma että haluat poistaa tämän kokoelman?"
},
"collection.editing": {
"message": "Muokataan kokoelmaa"
},
"collection.error.not-found": {
"message": "Kokoelmaa ei löydy"
},
"collection.label.created-at": {
"message": "Luotu {ago}"
},
"collection.label.curated-by": {
"message": "Kuratoinut"
},
"collection.label.no-projects": {
"message": "Ei vielä projekteja kokelmassa"
},
"collection.label.projects-count": {
"message": "{count, plural, =0 {No projects yet} other {<stat>{count}</stat> {type}}}"
},
"collection.label.updated-at": {
"message": "Päivitetty {ago}"
},
"collection.return-link.dashboard-collections": {
"message": "Kokoelmasi"
},
"collection.return-link.user": {
"message": "{user}:n profiili"
},
"collection.title": {
"message": "{name} - kokoelma"
},
"conversation-thread.action.add-private-note": {
"message": "Lisää yksityinen muistiinpano"
},
"conversation-thread.action.approve": {
"message": "Hyväksy"
},
"conversation-thread.action.approve-with-reply": {
"message": "Hyväksy vastauksella"
},
"conversation-thread.action.close-thread": {
"message": "Sulje keskustelu"
},
"conversation-thread.action.close-with-reply": {
"message": "Sulje vastauksella"
},
"conversation-thread.action.reject": {
"message": "Hylkää"
},
"conversation-thread.action.reject-with-reply": {
"message": "Hylkää vastauksella"
},
"conversation-thread.action.reopen-thread": {
"message": "Avaa keskustelu uudelleen"
},
"conversation-thread.action.reply": {
"message": "Vastaa"
},
"conversation-thread.action.reply-to-thread": {
"message": "Vastaa keskusteluun"
},
"conversation-thread.action.resubmit-for-review": {
"message": "Lähetä uudelleen arvioitavaksi"
},
"conversation-thread.action.resubmit-for-review-with-reply": {
"message": "Lähetä uudelleen arvioitavaksi vastauksella"
},
"conversation-thread.action.send": {
"message": "Lähetä"
},
"conversation-thread.action.send-to-review": {
"message": "Lähetä arvioitavaksi"
},
"conversation-thread.action.send-to-review-with-reply": {
"message": "Lähetä arvioitavaksi vastauksella"
},
"conversation-thread.reply-editor.placeholder.reply": {
"message": "Vastaa keskusteluun..."
},
"conversation-thread.reply-editor.placeholder.send": {
"message": "Lähetä viesti..."
},
"conversation-thread.reply-modal.header": {
"message": "Vastaa keskusteluun"
},
"create.collection.collection-info": {
"message": "Sinun uusi kokoelma luodaan julkiseksi kokoelmaksi {count, plural, =0 {no projects} one {# project} other {# projects}}:lla. "
},
"create.collection.create-collection": {
"message": "Luo kokoelma"
},
"create.collection.name-label": {
"message": "Nimi"
},
"create.collection.name-placeholder": {
"message": "Syötä kokoelman nimi..."
},
"create.collection.summary-label": {
"message": "Yhteenveto"
},
"create.collection.title": {
"message": "Luodaan kokoelmaa"
},
"create.limit-alert.contact-support": {
"message": "Ota yhteyttä tukeen"
},
"create.limit-alert.type-collection": {
"message": "kokoelma"
},
"create.limit-alert.type-organization": {
"message": "organisaatio"
},
"create.limit-alert.type-plural-collection": {
"message": "kokoelmat"
},
"create.limit-alert.type-plural-organization": {
"message": "organisaatiot"
},
"create.limit-alert.type-plural-project": {
"message": "projektit"
},
"create.limit-alert.type-project": {
"message": "projekti"
},
"create.organization.create-organization": {
"message": "Luo organisaatio"
},
"create.organization.name-label": {
"message": "Nimi"
},
"create.organization.name-placeholder": {
"message": "Syötä organisaation nimi..."
},
"create.organization.summary-label": {
"message": "Yhteenveto"
},
"create.project.visibility-private": {
"message": "Yksityinen"
},
"create.project.visibility-public": {
"message": "Julkinen"
},
"create.project.visibility-unlisted": {
"message": "Piilotettu"
},
"dashboard.collections.button.create-new": {
"message": "Luo uusi"
},
@@ -374,18 +521,165 @@
"dashboard.collections.long-title": {
"message": "Kokoelmasi"
},
"dashboard.collections.sort.name-ascending": {
"message": "Nimi (A-Z)"
},
"dashboard.collections.sort.recently-created": {
"message": "Äskettäin luotu"
},
"dashboard.collections.sort.recently-updated": {
"message": "Äskettäin päivitetty"
},
"dashboard.creator-tax-form-modal.confirmation.download-button": {
"message": "Lataa {formType}"
},
"dashboard.creator-tax-form-modal.confirmation.title": {
"message": "Kaikki valmista! 🎉"
},
"dashboard.creator-tax-form-modal.entity.private-individual": {
"message": "Yksityishenkilö"
},
"dashboard.creator-tax-form-modal.header": {
"message": "Vero lomake"
},
"dashboard.creator-tax-form-modal.us-citizen.question": {
"message": "Oletko Yhdysvaltain kansalainen?"
},
"dashboard.creator-withdraw-modal.details-label": {
"message": "Lisätiedot"
},
"dashboard.creator-withdraw-modal.fee-breakdown-amount": {
"message": "Määrä"
},
"dashboard.creator-withdraw-modal.kyc.private-individual": {
"message": "Yksityishenkilö"
},
"dashboard.creator-withdraw-modal.muralpay-details.crypto-warning-header": {
"message": "Vahvista lompakkosi osoite"
},
"dashboard.creator-withdraw-modal.paypal-details.payment-method": {
"message": "Maksutapa"
},
"dashboard.creator-withdraw-modal.paypal-details.paypal-account": {
"message": "PayPal-tili"
},
"dashboard.creator-withdraw-modal.tremendous-details.unverified-email-header": {
"message": "Vavhistamaton sähköposti"
},
"dashboard.creator-withdraw-modal.tremendous-details.usd-paypal-warning-header": {
"message": "Matalammat maksut saatavilla"
},
"dashboard.head-title": {
"message": "Hallintapaneeli"
},
"dashboard.notifications.empty.no-unread": {
"message": "Sinulla ei ole lukemattomia ilmoituksia."
},
"dashboard.notifications.link.see-all": {
"message": "Näytä kaikki"
},
"dashboard.notifications.link.view-history": {
"message": "Näytä ilmoitushistoria"
},
"dashboard.organizations.button.create": {
"message": "Luo organisaatio"
},
"dashboard.organizations.empty.cta": {
"message": "Tee organisaatio!"
},
"dashboard.organizations.error.fetch": {
"message": "Organisaatioiden haku epäonnistui"
},
"dashboard.organizations.member-count": {
"message": "{count} {count, plural, one {jäsen} other {jäsentä}}"
},
"dashboard.projects.head-title": {
"message": "Projektit"
},
"dashboard.projects.links.and-more": {
"message": "ja {count} lisää..."
},
"dashboard.projects.links.button.clear-link": {
"message": "Tyhjennä linkki"
},
"dashboard.projects.links.button.edit": {
"message": "Muokkaa linkkejä"
},
"dashboard.projects.links.discord-invite.description": {
"message": "Kutsulinkki sinun Discord-palvelimellesi."
},
"dashboard.projects.links.discord-invite.label": {
"message": "Discord-kutsu"
},
"dashboard.projects.links.placeholder.cleared": {
"message": "Olemassa oleva linkki tyhjennetään"
},
"dashboard.projects.links.placeholder.valid-discord-url": {
"message": "Syötä kelvollinen Discord-kutsu URL"
},
"dashboard.projects.links.placeholder.valid-url": {
"message": "Syötä kelvollinen URL"
},
"dashboard.projects.links.show-all-projects": {
"message": "Näytä kaikki projektit"
},
"dashboard.projects.links.source-code.label": {
"message": "Lähdekoodi"
},
"dashboard.projects.links.wiki-page.label": {
"message": "Wikisivu"
},
"dashboard.projects.project.icon-alt": {
"message": "Kuvake projektille {title}"
},
"dashboard.projects.sort.ascending": {
"message": "Nouseva"
},
"dashboard.projects.sort.descending": {
"message": "Laskeva"
},
"dashboard.projects.sort.option.name": {
"message": "Nimi"
},
"dashboard.projects.sort.option.status": {
"message": "Tila"
},
"dashboard.projects.sort.option.type": {
"message": "Tyyppi"
},
"dashboard.projects.table.icon": {
"message": "Kuvake"
},
"dashboard.projects.table.id": {
"message": "ID"
},
"dashboard.projects.table.name": {
"message": "Nimi"
},
"dashboard.projects.table.status": {
"message": "Tila"
},
"dashboard.projects.table.type": {
"message": "Tyyppi"
},
"dashboard.report.title": {
"message": "Raportti {id}"
},
"dashboard.reports.active-title": {
"message": "Aktiiviset raportit"
},
"dashboard.reports.title": {
"message": "Raportit"
},
"dashboard.revenue.available-now": {
"message": "Saatavilla nyt"
},
"dashboard.revenue.processing": {
"message": "Prosessoidaan"
},
"dashboard.revenue.transactions.btn.download-csv": {
"message": "Lataa CSV-tiedostona"
},
"error.collection.404.list_item.1": {
"message": "Saatoit kirjoittaa kokoelman URL osoitteen väärin."
},
@@ -419,12 +713,51 @@
"error.project.404.list_title": {
"message": "Miksi?"
},
"error.project.404.title": {
"message": "Projektia ei löytynyt"
},
"error.user.404.list_title": {
"message": "Miksi?"
},
"error.user.404.title": {
"message": "Käyttäjää ei löytynyt"
},
"frog": {
"message": "Löysit sammakon! 🐸"
},
"frog.title": {
"message": "Sammakko"
},
"hosting-marketing.included.backups-included": {
"message": "Varmuuskopiot sisällyttäen"
},
"hosting-marketing.included.file-manager": {
"message": "Helppokäyttöinen tiedostoselain"
},
"hosting-marketing.included.file-manager.description": {
"message": "Etsi, hallinnoi, muokkaa ja lataa tiedostoja suoraan palvelimellesi helposti."
},
"hosting-marketing.included.help": {
"message": "Apua kun sitä tarvitset"
},
"hosting-marketing.included.help.description": {
"message": "Ota yhteyttä Modrinthin tiimiin milloin tahansa palvelinasioissa."
},
"hosting-marketing.included.sftp-access": {
"message": "SFTP pääsy"
},
"hosting-marketing.know-what-you-need": {
"message": "Tiedät jo mitä tarvitset?"
},
"hosting-marketing.medal.info": {
"message": "Kokeile ilmaista <orange>3Gt palvelinta</orange> 5 päivän ajan, jonka tarjoaa <orange>Medal</orange>"
},
"hosting-marketing.medal.learn-more": {
"message": "Lue lisää"
},
"hosting.plan.out-of-stock": {
"message": "Loppuunmyyty"
},
"landing.button.discover-mods": {
"message": "Löydä modeja"
},
@@ -512,6 +845,9 @@
"layout.action.new-project": {
"message": "Uusi projekti"
},
"layout.action.publish": {
"message": "Julkaise"
},
"layout.avatar.alt": {
"message": "Avatarisi"
},
@@ -1235,9 +1235,6 @@
"hosting-marketing.faq.location": {
"message": "Nasaan ang mga server ng Modrinth Hosting? Makapipili ba ako ng rehiyon?"
},
"hosting-marketing.faq.location.answer": {
"message": "Mayroon kaming mga server na magagamit sa Hilagang Amerika, Yuropa, at Timog-silangang Asya sa kasalukuyang sandali na maaari mong piliin pagkatapos bumili. Dadating ang higit pang rehiyon sa hinaharap! Kung nais mong magpalit ng rehiyon, mangyaring abutin ang suporta."
},
"hosting-marketing.faq.versions-loaders": {
"message": "Ano bang bersiyon ng Minecraft at loader ang magagamit?"
},
+2 -2
View File
@@ -1014,7 +1014,7 @@
"message": "Organisations"
},
"dashboard.overview.notifications.button.mark-all-as-read": {
"message": "Mettre tout comme étant lu."
"message": "Marquer tout comme lu"
},
"dashboard.overview.notifications.button.view-history": {
"message": "Voire l'historique"
@@ -1536,7 +1536,7 @@
"message": "Où se trouvent les serveurs de Modrinth Hosting ? Puis-je choisir une région ?"
},
"hosting-marketing.faq.location.answer": {
"message": "Nous avons des serveurs disponibles en Amérique du Nord, en Europe et en Asie du Sud-Est en ce moment-même que vous pouvez choisir dès l'achat. Plus de régions à venir dans le futur ! Si vous souhaitez changer de région, veuillez contacter le support."
"message": "Nous avons des serveurs disponibles en Amérique du Nord, en Europe et en Asie du Sud-Est pour le moment que vous pouvez choisir lors de l'achat. Plus de régions sont à venir ! Si vous voulez changer de région, contactez le support."
},
"hosting-marketing.faq.versions-loaders": {
"message": "Quelles versions de Minecraft et loaders peuvent-être utilisés ?"
@@ -1163,9 +1163,6 @@
"hosting-marketing.faq.location": {
"message": "היכן ממוקמים שרתי האחסון של Modrinth? האם ניתן לבחור אזור?"
},
"hosting-marketing.faq.location.answer": {
"message": "כרגע זמינים עבורכם שרתים בצפון אמריקה, אירופה ודרום-מזרח אסיה, אותם ניתן לבחור בעמד הרכישה. אזורים נוספים יתווספו בעתיד! אם תרצו להחליף את האזור שלכם, אנא צרו קשר עם התמיכה."
},
"hosting-marketing.faq.versions-loaders": {
"message": "באילו גרסאות של מיינקראפט ובאילו Loaders ניתן להשתמש?"
},
+20 -11
View File
@@ -291,7 +291,7 @@
"message": "Már van fiókod?"
},
"auth.sign-up.subscribe.label": {
"message": "Iratkozzon fel a Modrinth frissítéseiről szóló értesítésekre"
"message": "Feliratkozás a Modrinth híreire és frissítéseire"
},
"auth.sign-up.title": {
"message": "Regisztráció"
@@ -333,7 +333,7 @@
"message": "Email-cím hitelesítése"
},
"auth.welcome.checkbox.subscribe": {
"message": "Iratkozzon fel a Modrinth frissítéseiről szóló értesítésekre"
"message": "Feliratkozás a Modrinth híreire és frissítéseire"
},
"auth.welcome.description": {
"message": "Most már része vagy annak a fantasztikus fejlesztők és felfedezők közösségének, akik már építenek, letöltenek és naprakészek maradnak a csodálatos modokkal kapcsolatban."
@@ -416,6 +416,9 @@
"conversation-thread.action.approve-with-reply": {
"message": "Jóváhagyás és válasz"
},
"conversation-thread.action.close-thread": {
"message": "Gondolatmenet lezárása"
},
"conversation-thread.action.close-with-reply": {
"message": "Bezárás és válasz"
},
@@ -950,6 +953,9 @@
"dashboard.head-title": {
"message": "Irányítópult"
},
"dashboard.notifications.empty.no-unread": {
"message": "Nincsenek olvasatlan értesítéseid."
},
"dashboard.notifications.link.see-all": {
"message": "Összes megtekintése"
},
@@ -1478,9 +1484,6 @@
"hosting-marketing.faq.location": {
"message": "Hol találhatók a Modrinth Hosting szerverei? Kiválaszthatom a régiót?"
},
"hosting-marketing.faq.location.answer": {
"message": "Jelenleg Észak-Amerikában, Európában és Délkelet-Ázsiában állnak rendelkezésre szerverek, amelyek közül vásárláskor választhatsz. A jövőben további régiók is elérhetővé válnak! Ha szeretnéd megváltoztatni a régiót, vedd fel a kapcsolatot az ügyfélszolgálattal."
},
"hosting-marketing.faq.versions-loaders": {
"message": "Melyik Minecraft verziók és betöltők használhatók?"
},
@@ -1749,7 +1752,7 @@
"message": "Játékosoknak"
},
"landing.section.for-players.tagline": {
"message": "Fedez fel több mint {count, number} alkotást"
"message": "Fedezz fel több mint {count, number} alkotást"
},
"landing.subheading": {
"message": "Fedezz fel, játssz és ossz meg Minecraft-tartalmakat a közösség számára létrehozott nyílt forráskódú platformunkon."
@@ -1815,7 +1818,7 @@
"message": "Mindig mellőzd"
},
"layout.banner.build-fail.description": {
"message": "A Modrinth felhasználói felületének jelenlegi telepítése nem tudta az API-ból lekérni az állapotadatokat. Ennek oka lehet egy szolgáltatáskimaradás vagy konfigurációs hiba. Kérünk, próbáld meg újra, amikor az API újra elérhetővé válik. Hibakódok: {errors}; Az API jelenlegi linkje: {url}"
"message": "A Modrinth felhasználói felületének jelenlegi telepítése nem tudta az API-ból lekérni az állapotadatokat. Ennek oka lehet egy szolgáltatáskimaradás vagy konfigurációs hiba. Kérlek próbáld meg újra, amikor az API újra elérhetővé válik. Hibakódok: {errors}; Az API jelenlegi linkje: {url}"
},
"layout.banner.build-fail.ignore": {
"message": "Mellőz"
@@ -1827,7 +1830,7 @@
"message": "Ha a hivatalos Modrinth weboldalt szeretnéd elérni, látogass el a {url} oldalra. Ezt az előzetes verziót a Modrinth munkatársai tesztelési célokra használják. A <branch-link>{owner}/{branch</branch-link> @ {commit} használatával készült."
},
"layout.banner.preview.title": {
"message": "Ez a Modrinth weboldal előzetes telepítése."
"message": "Ez a Modrinth weboldal előzetes verziója."
},
"layout.banner.staging.description": {
"message": "A tesztelési környezet teljesen elkülönül az éles Modrinth adatbázistól. Ezt tesztelési és hibakeresési célokra használják, és a Modrinth backend vagy frontend fejlesztés alatt álló, az éles példánynál újabb verzióit futtathatja."
@@ -2628,10 +2631,10 @@
"message": "Átdolgoztuk a Modrinth Környezetek rendszerét, és új lehetőségek érhetők el. Kérjük, ellenőrizd, hogy a metaadatok helyesek-e."
},
"project.environment.migration.review-button": {
"message": "Környezet beállítások Átnézése"
"message": "Környezeti beállítások áttekintése"
},
"project.environment.migration.title": {
"message": "Kérjük, tekintse át a környezet metaadatait"
"message": "Kérlek tekintsd át a környezeti metaadatokat"
},
"project.error.loading": {
"message": "Hiba a projektadatok {message} betöltése közben"
@@ -2669,12 +2672,18 @@
"project.moderation.admonition.draft.submit-for-review": {
"message": "Miután elvégezted az összes szükséges lépést, és meggyőződtél arról, hogy a projekted megfelel a Modrinth <rules-link>Tartalmi szabályainak</rules-link>, benyújthatod a projektedet felülvizsgálatra."
},
"project.moderation.admonition.rejected.header": {
"message": "Változtatások kérve lettek"
},
"project.moderation.admonition.under-review.body.5": {
"message": "<emphasis>Köszönjük türelmedet, amíg moderátoraink keményen dolgoznak a Modrinth biztonságának fenntartásán, és alig várjuk, hogy segíthessünk tartalmaid megosztásában! 💚</emphasis>"
},
"project.moderation.admonition.under-review.header": {
"message": "Projekt áttekintés alatt"
},
"project.moderation.thread.title": {
"message": "Moderációs üzenetek"
},
"project.moderation.title": {
"message": "Moderáció"
},
@@ -3489,7 +3498,7 @@
"message": "Amikor engedélyezel egy alkalmazást a Modrinth fiókoddal, hozzáférést biztosítasz számára a fiókodhoz. A fiókodhoz való hozzáférést bármikor kezelheted és ellenőrizheted itt."
},
"settings.authorizations.empty-state": {
"message": "Jelenleg nem tudjuk megjeleníteni a jogosult alkalmazásait, dolgozunk a probléma megoldásán. Kérjük, látogassa meg ezt az oldalt később!"
"message": "Jelenleg nem tudjuk megjeleníteni az azonosított alkalmazásokat, dolgozunk a probléma megoldásán. Kérlek látogasd meg ezt az oldalt később!"
},
"settings.authorizations.head-title": {
"message": "Engedélyek"
@@ -1163,9 +1163,6 @@
"hosting-marketing.faq.location": {
"message": "Di mana server Modrinth Hosting terletak? Dapatkah saya memilih wilayah?"
},
"hosting-marketing.faq.location.answer": {
"message": "Server kami tersedia di Amerika Utara, Eropa, dan Asia Tenggara dan Anda dapat memilihnya saat membeli. Wilayah-wilayah lain akan segera hadir di masa mendatang! Bila Anda ingin mengganti wilayah Anda, mohon hubungi dukungan."
},
"hosting-marketing.faq.versions-loaders": {
"message": "Versi dan pemuat Minecraft apa sajakah yang dapat digunakan?"
},
@@ -1373,9 +1373,6 @@
"hosting-marketing.faq.location": {
"message": "Modrinthでホストするサーバーはどこにありますか?地域を選択できますか?"
},
"hosting-marketing.faq.location.answer": {
"message": "現時点では、北アメリカ、ヨーロッパ、東南アジアのサーバーを購入時に選択できます。今後、より多くの地域に対応予定です!地域を変更したい場合はサポートまでお問い合わせください。"
},
"hosting-marketing.faq.versions-loaders": {
"message": "どのMinecraftのバージョンとローダーが使えますか?"
},
+2 -2
View File
@@ -687,7 +687,7 @@
"message": "제휴 링크 검색..."
},
"dashboard.analytics.from-projects": {
"message": "프로젝트 {count}개"
"message": "{count} {count, plural, one {프로젝트} other {프로젝트}}로"
},
"dashboard.analytics.total-downloads": {
"message": "다운로드 수"
@@ -1536,7 +1536,7 @@
"message": "Modrinth 호스팅 서버는 어디에 위치해 있나요? 지역을 선택할 수 있나요?"
},
"hosting-marketing.faq.location.answer": {
"message": "현재 서버는 구매 시 북미, 유럽, 동남아 지역 중에서 선택할 수 있습니다. 향후 더 많은 지역에서 서비스를 제공할 예정입니다! 지역을 변경이 필요하면 지원팀에 문의해 주세요."
"message": "현재 북미, 유럽, 동남아시아 전역에서 구매 시 선택할 수 있는 서버가 있습니다. 앞으로 더 많은 지역이 추가될 예정입니다! 지역을 변경하고 싶으시면 지원팀에 문의해 주세요."
},
"hosting-marketing.faq.versions-loaders": {
"message": "어떤 마인크래프트 버전과 로더를 사용할 수 있나요?"
+21 -3
View File
@@ -449,6 +449,27 @@
"conversation-thread.action.send-to-review-with-reply": {
"message": "Hantar untuk semakan dengan balasan"
},
"conversation-thread.error.closing-report": {
"message": "Ralat semasa menutup laporan"
},
"conversation-thread.error.reopening-report": {
"message": "Ralat semasa membuka semula laporan"
},
"conversation-thread.error.sending-message": {
"message": "Ralat semasa menghantar mesej"
},
"conversation-thread.reply-editor.placeholder.reply": {
"message": "Balas bebenang..."
},
"conversation-thread.reply-editor.placeholder.send": {
"message": "Hantar mesej..."
},
"conversation-thread.reply-modal.confirmation.description": {
"message": "Sahkan bahawa penyederhana tidak memantau bebenang ini secara aktif"
},
"conversation-thread.reply-modal.confirmation.label": {
"message": "Saya akui bahawa penyederhana tidak memantau bebenang ini secara aktif."
},
"conversation-thread.resubmit-modal.description": {
"message": "Anda sedang menghantar <project-title>{projectTitle}</project-title> untuk disemak semula oleh penyederhana."
},
@@ -1373,9 +1394,6 @@
"hosting-marketing.faq.location": {
"message": "Di manakah pelayan Modrinth Hosting terletak? Bolehkah saya memilih rantau?"
},
"hosting-marketing.faq.location.answer": {
"message": "Kami mempunyai pelayan yang tersedia di Amerika Utara, Eropah dan Asia Tenggara pada masa ini yang boleh anda pilih semasa pembelian. Lebih banyak rantau akan datang pada masa hadapan! Jika anda ingin menukar rantau anda, sila hubungi sokongan."
},
"hosting-marketing.faq.versions-loaders": {
"message": "Versi Minecraft dan pemuat apa yang boleh digunakan?"
},
+35 -2
View File
@@ -407,11 +407,20 @@
"collection.title": {
"message": "{name} - Collectie"
},
"conversation-thread.reply-modal.description": {
"message": "Je project is al goedgekeurd. Daarom houdt het moderatieteam deze thread niet actief in de gaten. Mocht er echter een probleem met je project zijn, dan kunnen zij je bericht wel zien."
},
"conversation-thread.reply-modal.help-center-note": {
"message": "Als je contact wilt opnemen met het moderatorteam, ga dan naar het <help-center-link>Modrinth Helpcentrum</help-center-link> en klik op het blauwe ballonnetje rechtsonder om contact op te nemen met de ondersteuning."
},
"conversation-thread.resubmit-modal.warning": {
"message": "Herhaaldelijk berichten plaatsen zonder in te gaan op de opmerkingen van de moderators kan leiden tot een opschorting van je account."
},
"create-project-version.create-modal.stage.add-files.admonition": {
"message": "Aanvullende bestanden zijn bedoeld voor ondersteunende bronnen zoals source code, niet voor alternatieve versies of varianten."
},
"create.collection.collection-info": {
"message": "Je nieuwe collectie wordt gemaakt als een publieke collectie met {{count, plural,=0 {geen projecten}one {# project}other {# projecten}}."
"message": "Je nieuwe collectie wordt gemaakt als een publieke collectie met {count, plural,=0 {geen projecten}one {# project}other {# projecten}}."
},
"create.collection.create-collection": {
"message": "Collectie aanmaken"
@@ -572,6 +581,9 @@
"dashboard.affiliate-links.search": {
"message": "Zoek affiliatelinks..."
},
"dashboard.analytics.from-projects": {
"message": "van {count} {count, plural, one {project} other {projects}}"
},
"dashboard.collections.button.create-new": {
"message": "Maak nieuwe"
},
@@ -848,6 +860,18 @@
"dashboard.creator-withdraw-modal.withdraw-limit-used": {
"message": "Je hebt je opnamelimiet <b>{withdrawLimit}</b> bereikt. Je moet een belastingformulier invullen om meer geld op te nemen."
},
"dashboard.notifications.link.view-more": {
"message": "Bekijk {extraNotifs} meer {extraNotifs, plural, one {notification} other {notifications}}"
},
"dashboard.organizations.member-count": {
"message": "{count} {count, plural, one {member} other {members}}"
},
"dashboard.projects.links.changes-applied": {
"message": "De wijzigingen worden toegepast op <strong>{count}</strong> {count, plural, one {project} other {projects}}."
},
"dashboard.projects.links.description": {
"message": "Alle links die u hieronder opgeeft, worden in elk van de geselecteerde projecten overschreven. Links die u leeg laat, worden genegeerd. U kunt een link uit alle geselecteerde projecten verwijderen met de prullenbakknop."
},
"dashboard.revenue.available-now": {
"message": "Nu beschikbaar"
},
@@ -1004,6 +1028,15 @@
"dashboard.withdraw.error.tax-form.title": {
"message": "Gelieve het belastingformulier in te vullen"
},
"discover.seo.description": {
"message": "Zoek en blader door duizenden Minecraft {projectType, select, mod {mods} modpack {modpacks} resourcepack {resource packs} shader {shaders} plugin {plugins} datapack {datapacks} other {projects}} op Modrinth met directe, nauwkeurige zoekresultaten. Onze filters helpen je snel de beste Minecraft {projectType, select, mod {mods} modpack {modpacks} resourcepack {resource packs} shader {shaders} plugin {plugins} datapack {datapacks} other {projects}}."
},
"discover.seo.title": {
"message": "Zoek {projectType, select, mod {mods} modpack {modpacks} resourcepack {resource packs} shader {shaders} plugin {plugins} datapack {datapacks} other {projects}}"
},
"discover.seo.title-with-query": {
"message": "Zoek {projectType, select, mod {mods} modpack {modpacks} resourcepack {resource packs} shader {shaders} plugin {plugins} datapack {datapacks} other {projects}} | {query}"
},
"error.collection.404.list_item.1": {
"message": "U heeft mogelijk de URL van de collectie fout ingetypt."
},
@@ -1164,7 +1197,7 @@
"message": "Waar bevinden de servers van Modrinth Hosting zich? Kan ik een regio kiezen?"
},
"hosting-marketing.faq.location.answer": {
"message": "We hebben momenteel servers beschikbaar in Noord-Amerika, Europa en Zuidoost-Azië, waaruit u bij aankoop kunt kiezen. In de toekomst zullen er meer regio's volgen! Als u uw regio wilt wijzigen, neem dan contact op met de klantenservice."
"message": "Op dit moment hebben we servers beschikbaar in Noord-Amerika, Europa en Zuidoost-Azië, waaruit u bij aankoop kunt kiezen. In de toekomst komen er nog meer regios bij! Als u van regio wilt wisselen, neem dan contact op met de klantenservice."
},
"hosting-marketing.faq.versions-loaders": {
"message": "Welke Minecraft-versies en loaders kunnen worden gebruikt?"
@@ -1238,9 +1238,6 @@
"hosting-marketing.faq.location": {
"message": "Hvor oppholder Modrinth Hosting-serverne seg? Kan jeg velge en region?"
},
"hosting-marketing.faq.location.answer": {
"message": "Akkurat nå, så har tilgjengelige servere i Nord-Amerika, Europa, og Sørøst-Asia som du kan velge etter kjøpet ditt. Det kommer flere regioner i framtida! Viss du vil bytte regionen din, vær så snill å ta kontakt med støtte."
},
"hosting-marketing.faq.versions-loaders": {
"message": "Hvilke Minecraft-versjoner-og-loadere kan brukes?"
},
+5 -5
View File
@@ -1362,13 +1362,13 @@
"message": "Selecionando o pacote de mods para instalar após a redefinição"
},
"discover.seo.description": {
"message": "Busque e explore milhares de {projectType, select, mod {mods} modpack {pacotes de mods} resourcepack {pacotes de recursos} shader {shaders} plugin {plugins} datapack {pacotes de dados} other {projetos}} de Minecraft no Modrinth com resultados de busca instantâneos e precisos. Nossos filtros ajudam você a encontrar rapidamente os melhores {projectType, select, mod {mods} modpack {pacotes de mods} resourcepack {pacotes de recursos} shader {shaders} plugin {plugins} datapack {pacotes de dados} other {projetos}} de Minecraft."
"message": "Busque e explore milhares de {projectType, select, mod {mods} modpack {pacotes de mods (modpacks)} resourcepack {pacotes de recursos (resourcepacks)} shader {sombreadores (shaders)} plugin {plugins} datapack {pacotes de dados (datapacks)} other {projetos}} de Minecraft no Modrinth com resultados de busca instantâneos e precisos. Nossos filtros ajudam você a encontrar rapidamente os melhores {projectType, select, mod {mods} modpack {pacotes de mods (modpacks)} resourcepack {pacotes de recursos (resourcepacks)} shader {sombreadores (shaders)} plugin {plugins} datapack {pacotes de dados (datapacks)} other {projetos}} de Minecraft."
},
"discover.seo.title": {
"message": "Buscar {projectType, select, mod {mods} modpack {pacotes de mods} resourcepack {pacotes de recursos} shader {shaders} plugin {plugins} datapack {pacotes de dados} other {projetos}}"
"message": "Buscar {projectType, select, mod {mods} modpack {pacotes de mods (modpacks)} resourcepack {pacotes de recursos (resourcepacks)} shader {sombreadores (shaders)} plugin {plugins} datapack {pacotes de dados (datapacks)} other {projetos}}"
},
"discover.seo.title-with-query": {
"message": "Buscar {projectType, select, mod {mods} modpack {pacotes de mods} resourcepack {pacotes de recursos} shader {shaders} plugin {plugins} datapack {pacotes de dados} other {projetos}} | {query}"
"message": "Buscar {projectType, select, mod {mods} modpack {pacotes de mods (modpacks)} resourcepack {pacotes de recursos (resourcepacks)} shader {sombreadores (shaders)} plugin {plugins} datapack {pacotes de dados (datapacks)} other {projetos}} | {query}"
},
"error.collection.404.list_item.1": {
"message": "Você pode ter digitado incorretamente o URL da coleção."
@@ -2565,10 +2565,10 @@
"message": "Servidor"
},
"project-type.shader.plural": {
"message": "Shaders"
"message": "Sombreadores"
},
"project-type.shader.singular": {
"message": "Shader"
"message": "Sombreador"
},
"project.about.details.created": {
"message": "Criado {date}"
@@ -1229,9 +1229,6 @@
"hosting-marketing.faq.location": {
"message": "Onde estão localizados os servidores Modrinth Hosting? Posso escolher uma região?"
},
"hosting-marketing.faq.location.answer": {
"message": "Temos servidores disponíveis na América do Norte, Europa e Ásia Sudeste, que podes escolher no momento da compra. Mais regiões serão adicionadas no futuro! Se quiseres trocar a tua região, entra em contacto com o suporte."
},
"hosting-marketing.faq.versions-loaders": {
"message": "Que versões de Minecraft e loaders podem ser utilizados?"
},
+16 -16
View File
@@ -408,25 +408,25 @@
"message": "{name} — Коллекция"
},
"conversation-thread.action.add-private-note": {
"message": "Добавить примечание для себя"
"message": "Добавить приватную заметку"
},
"conversation-thread.action.approve": {
"message": "Одобрить"
},
"conversation-thread.action.approve-with-reply": {
"message": "Одобрить с ответом"
"message": "Одобрить с ответом"
},
"conversation-thread.action.close-thread": {
"message": "Закрыть ветку"
},
"conversation-thread.action.close-with-reply": {
"message": "Закрыть с ответом"
"message": "Закрыть с ответом"
},
"conversation-thread.action.reject": {
"message": "Отклонить"
},
"conversation-thread.action.reject-with-reply": {
"message": "Отклонить с ответом"
"message": "Отклонить с ответом"
},
"conversation-thread.action.reopen-thread": {
"message": "Возобновить ветку"
@@ -435,34 +435,34 @@
"message": "Ответить"
},
"conversation-thread.action.reply-to-thread": {
"message": "Ответить на ветку"
"message": "Ответить в ветке"
},
"conversation-thread.action.resubmit-for-review": {
"message": "Запросить перепроверку"
"message": "Отправить на перепроверку"
},
"conversation-thread.action.resubmit-for-review-with-reply": {
"message": "Запросить перепроверку с ответом"
"message": "Отправить на перепроверку с ответом"
},
"conversation-thread.action.send": {
"message": "Отправить"
},
"conversation-thread.action.send-to-review": {
"message": "Отправить на проверку"
"message": "Отправить на проверку"
},
"conversation-thread.action.send-to-review-with-reply": {
"message": "Отправить на проверку с ответом"
"message": "Отправить на проверку с ответом"
},
"conversation-thread.action.set-to-draft": {
"message": "Установить в черновик"
"message": "Установить в черновик"
},
"conversation-thread.action.set-to-draft-with-reply": {
"message": "Установить в черновик с ответом"
"message": "Установить в черновик с ответом"
},
"conversation-thread.action.withhold": {
"message": "Удержать"
},
"conversation-thread.action.withhold-with-reply": {
"message": "Удержать с ответом"
"message": "Удержать с ответом"
},
"conversation-thread.closed-thread.description": {
"message": "Эта ветка закрыта, новые сообщения в неё нельзя отправить."
@@ -477,10 +477,10 @@
"message": "Ошибка отправки сообщения"
},
"conversation-thread.reply-editor.placeholder.reply": {
"message": "Ответить в ветку..."
"message": "Ответьте в ветке..."
},
"conversation-thread.reply-editor.placeholder.send": {
"message": "Отправить сообщение..."
"message": "Отправьте сообщение..."
},
"conversation-thread.reply-modal.confirmation.description": {
"message": "Подтвердить, что модераторы не проводят активный просмотр"
@@ -492,7 +492,7 @@
"message": "Ваш проект уже одобрен. Из-за этого модерация не проводит активный просмотр этой ветки. Однако, если возникнет проблема с вашим проектом, она сможет увидеть ваше сообщение."
},
"conversation-thread.reply-modal.header": {
"message": "Ответить на ветку"
"message": "Ответ в ветке"
},
"conversation-thread.reply-modal.help-center-note": {
"message": "Если вам нужно выйти на контакт с командой модерации, используйте <help-center-link>справочный центр Modrinth</help-center-link> и нажмите на синий значок в правом нижнем углу для связи с поддержкой."
@@ -2496,7 +2496,7 @@
"message": "Запросите проверку"
},
"project-moderation-nags.submit-for-review-button": {
"message": "Отправить на проверку"
"message": "Отправить на проверку"
},
"project-moderation-nags.submit-for-review-desc": {
"message": "Проект сейчас виден только участникам. Для публикации он должен пройти проверку модераторами."
@@ -1184,9 +1184,6 @@
"hosting-marketing.faq.location": {
"message": "Var finns Modrinth Hostings servrar? Kan jag välja region?"
},
"hosting-marketing.faq.location.answer": {
"message": "Vi har för närvarande servrar tillgängliga i Nordamerika, Europa och Sydostasien som du kan välja mellan vid köpet. Fler regioner kommer att läggas till i framtiden! Om du vill byta region, vänligen kontakta supporten."
},
"hosting-marketing.faq.versions-loaders": {
"message": "Vilka Minecraft versioner och loaders kan användas?"
},
+178 -1
View File
@@ -407,6 +407,108 @@
"collection.title": {
"message": "{name} - Koleksiyon"
},
"conversation-thread.action.add-private-note": {
"message": "Özel not ekle"
},
"conversation-thread.action.approve": {
"message": "Onaylandı"
},
"conversation-thread.action.approve-with-reply": {
"message": "Onaylandı, işlem tamamlandı"
},
"conversation-thread.action.close-thread": {
"message": "Konuyu kapat"
},
"conversation-thread.action.close-with-reply": {
"message": "Cevapla ve kapat"
},
"conversation-thread.action.reject": {
"message": "Reddet"
},
"conversation-thread.action.reject-with-reply": {
"message": "Cevap vererek reddet"
},
"conversation-thread.action.reopen-thread": {
"message": "Konuyu yeniden aç"
},
"conversation-thread.action.reply": {
"message": "Yanıtla"
},
"conversation-thread.action.reply-to-thread": {
"message": "Konuya yanıt ver"
},
"conversation-thread.action.resubmit-for-review": {
"message": "İnceleme için yeniden gönder"
},
"conversation-thread.action.resubmit-for-review-with-reply": {
"message": "Yanıtla birlikte yeniden incelemeye gönder"
},
"conversation-thread.action.send": {
"message": "Gönder"
},
"conversation-thread.action.send-to-review": {
"message": "İncelemeye gönder"
},
"conversation-thread.action.send-to-review-with-reply": {
"message": "Yanıtla birlikte incelemeye gönder"
},
"conversation-thread.action.withhold": {
"message": "Yanıtla birlikte taslağa çevir"
},
"conversation-thread.action.withhold-with-reply": {
"message": "Yanıtla birlikte beklet"
},
"conversation-thread.closed-thread.description": {
"message": "Bu konu kapatılmıştır ve yeni mesaj gönderilemez."
},
"conversation-thread.error.closing-report": {
"message": "Rapor kapatılırken hata oluştu"
},
"conversation-thread.error.sending-message": {
"message": "Mesaj gönderilirken hata oluştu"
},
"conversation-thread.reply-editor.placeholder.reply": {
"message": "Konuya yanıt ver..."
},
"conversation-thread.reply-editor.placeholder.send": {
"message": "Mesaj gönder..."
},
"conversation-thread.reply-modal.confirmation.description": {
"message": "Moderatörlerin bunu aktif olarak izlemediğini onayla"
},
"conversation-thread.reply-modal.confirmation.label": {
"message": "Moderatörlerin bu konuyu aktif olarak denetlemediğini kabul ediyorum."
},
"conversation-thread.reply-modal.description": {
"message": "Projeniz zaten onaylanmış durumda. Bu nedenle moderasyon ekibi bu konuyu aktif olarak takip etmez. Ancak projenizle ilgili bir sorun oluşursa mesajınızı yine de görebilirler."
},
"conversation-thread.reply-modal.header": {
"message": "Konuyu yanıtla"
},
"conversation-thread.reply-modal.help-center-note": {
"message": "Moderasyon ekibiyle iletişime geçmeniz gerekiyorsa, lütfen <help-center-link>Modrinth Yardım Merkezi</help-center-link> adresini kullanın ve destekle iletişime geçmek için sağ alt köşedeki mavi sohbet simgesine tıklayın."
},
"conversation-thread.resubmit-modal.confirmation.description": {
"message": "Moderatörlerin mesajlarını yanıtladığımı onaylıyorum"
},
"conversation-thread.resubmit-modal.confirmation.label": {
"message": "Moderatörlerin yorumlarını uygun şekilde yanıtladığımı onaylıyorum."
},
"conversation-thread.resubmit-modal.description": {
"message": "<project-title>{projectTitle}</project-title> projesini moderatörler tarafından yeniden incelenmek üzere gönderiyorsunuz."
},
"conversation-thread.resubmit-modal.header.resubmitting": {
"message": "İnceleme için yeniden gönderiliyor"
},
"conversation-thread.resubmit-modal.header.submitting": {
"message": "İncelemeye gönderiliyor"
},
"conversation-thread.resubmit-modal.reminder": {
"message": "Moderatör ekibinin tüm yorumlarını ele aldığınızdan emin olun."
},
"conversation-thread.resubmit-modal.warning": {
"message": "Moderatörlerin yorumlarını ele almadan tekrar tekrar gönderim yapmak, hesabınızın askıya alınmasına neden olabilir."
},
"create-project-version.create-modal.stage.add-files.admonition": {
"message": "Ek dosyalar, alternatif sürümler veya varyantlar için değil, kaynak kodu gibi destekleyici kaynaklar içindir."
},
@@ -875,6 +977,9 @@
"dashboard.head-title": {
"message": "Kontrol Paneli"
},
"dashboard.notifications.empty.no-unread": {
"message": "Okunmamış bildiriminiz yok."
},
"dashboard.notifications.link.see-all": {
"message": "Hepsi"
},
@@ -899,6 +1004,27 @@
"dashboard.organizations.title": {
"message": "Organizasyonlar"
},
"dashboard.overview.notifications.button.mark-all-as-read": {
"message": "Tümünü okundu olarak işaretle"
},
"dashboard.overview.notifications.button.view-history": {
"message": "Geçmişi görüntüle"
},
"dashboard.overview.notifications.empty.no-unread": {
"message": "Okunmamış bildiriminiz yok."
},
"dashboard.overview.notifications.error.loading": {
"message": "Bildirimler yüklenirken hata oluştu:"
},
"dashboard.overview.notifications.history.label": {
"message": "Geçmiş"
},
"dashboard.overview.notifications.history.title": {
"message": "Bildirim geçmişi"
},
"dashboard.overview.notifications.loading": {
"message": "Bildirimler yükleniyor..."
},
"dashboard.projects.bulk-edit-hint": {
"message": "Aşağıdan seçerek birden fazla projeyi düzenleyebilirsiniz."
},
@@ -1208,6 +1334,30 @@
"dashboard.withdraw.error.tax-form.title": {
"message": "Lütfen vergi formunu tamamlayınız"
},
"discover.install.back-to-setup": {
"message": "Sunucuya geri dön"
},
"discover.install.cancel-reset": {
"message": "Sıfırlamayı iptal et"
},
"discover.install.error.no-server-world": {
"message": "Yüklenebilecek hiçbir sunucu dünyası mevcut değil."
},
"discover.install.error.unsupported-content-type": {
"message": "Bu içerik türü, tarayıcıdan bir sunucuya yüklenemez."
},
"discover.install.heading.reset-modpack": {
"message": "Sıfırlama sonrası yüklenecek mod paketi seçiliyor"
},
"discover.seo.description": {
"message": "Modrinth üzerinde anında ve doğru arama sonuçlarıyla binlerce Minecraft {projectType, select, mod {mod} modpack {modpack} resourcepack {kaynak paketi} shader {shader} plugin {eklenti} datapack {veri paketi} other {proje}} arasında arama yap ve göz at. Filtrelerimiz en iyi Minecraft {projectType, select, mod {modları} modpack {mod paketlerini} resourcepack {kaynak paketlerini} shader {shaderları} plugin {eklentileri} datapack {veri paketlerini} other {projeleri}} hızlıca bulmana yardımcı olur."
},
"discover.seo.title": {
"message": "Ara {projectType, select, mod {modları} modpack {mod paketleri} resourcepack {kaynak paketleri} shader {shaderlar} plugin {eklentiler} datapack {veri paketleri} other {projeler}}"
},
"discover.seo.title-with-query": {
"message": "Ara {projectType, select, mod {modları} modpack {mod paketleri} resourcepack {kaynak paketleri} shader {shaderlar} plugin {eklentiler} datapack {veri paketleri} other {projeler}} | {query}"
},
"error.collection.404.list_item.1": {
"message": "Koleksiyonun URL'ini yanlış yazmış olabilirsin."
},
@@ -1223,6 +1373,12 @@
"error.collection.404.title": {
"message": "Koleksiyon bulunamadı"
},
"error.generic.401.signed-in-as": {
"message": "Şu anda şu hesapla oturum açtınız:"
},
"error.generic.401.title": {
"message": "Bu sayfaya erişiminiz yok"
},
"error.generic.404.subtitle": {
"message": "Aradığın sayfa yokmuş gibi duruyor."
},
@@ -1368,7 +1524,7 @@
"message": "Modrinth Hosting sunucuları nerede bulunuyor? Bölge seçebilir miyim?"
},
"hosting-marketing.faq.location.answer": {
"message": "Şu anda Kuzey Amerika, Avrupa ve Güneydoğu Asya'da satın alabileceğiniz sunucularımız bulunmaktadır. Gelecekte daha fazla bölge eklenecektir! Bölgenizi değiştirmek isterseniz, lütfen destek ekibiyle iletişime geçin."
"message": "Şu anda satın alma sırasında seçebileceğiniz sunucular Kuzey Amerika, Avrupa ve Güneydoğu Asya bölgelerinde mevcuttur. Yakında daha fazla bölge eklenecektir. Bölgenizi değiştirmek isterseniz lütfen destek ekibiyle iletişime geçin."
},
"hosting-marketing.faq.versions-loaders": {
"message": "Hangi Minecraft sürümleri ve yükleyiciler kullanılabilir?"
@@ -1649,6 +1805,9 @@
"layout.action.create-new": {
"message": "Yeni oluştur..."
},
"layout.action.external-projects": {
"message": "Harici projeler"
},
"layout.action.file-lookup": {
"message": "Dosya bulma"
},
@@ -1697,12 +1856,21 @@
"layout.banner.add-email.description": {
"message": "Güvenlik sebebiyle Modrinth hesabınıza bir e-posta adresi kaydetmeniz gerek."
},
"layout.banner.build-fail.always-ignore": {
"message": "Her zaman yok say"
},
"layout.banner.build-fail.description": {
"message": "Modrinth'in önucunun bu dağıtımı API'den durum oluşturamadı. Bu bir kesintiden veya yapılandırmadaki bir hatadan kaynaklı olabilir. API mevcutken tekrar derleyin. Hata kodları: {errors}; şu anki API adresi: {url}"
},
"layout.banner.build-fail.ignore": {
"message": "Yok say"
},
"layout.banner.build-fail.title": {
"message": "Derleme esnasında API'den durum oluştururken hata."
},
"layout.banner.preview.description": {
"message": "Eğer resmi Modrinth web sitesine erişmek istiyorsanız, {url} adresini ziyaret edin. Bu önizleme sürümü Modrinth ekibi tarafından test amaçlı kullanılmaktadır. <branch-link>{owner}/{branch}</branch-link> @ {commit} kullanılarak derlenmiştir."
},
"layout.banner.preview.title": {
"message": "Bu, Modrinth web sitesinin önizleme dağıtımıdır."
},
@@ -1898,6 +2066,9 @@
"moderation.moderate": {
"message": "Yönet"
},
"moderation.page.external-projects": {
"message": "Harici projeler"
},
"moderation.page.projects": {
"message": "Projeler"
},
@@ -3332,6 +3503,9 @@
"settings.billing.charges.description": {
"message": "Modrinth hesabınıza geçmişte yapılan tüm ödemeleriniz burada listelenir:"
},
"settings.billing.charges.product.pyro": {
"message": "Modrinth Barındırma"
},
"settings.billing.charges.title": {
"message": "Past charges"
},
@@ -3440,6 +3614,9 @@
"settings.billing.pyro.ram": {
"message": "{gb} GB RAM"
},
"settings.billing.pyro.resubscribe.error.text": {
"message": "Modrinth sunucuna yeniden abone olurken hata oluştu."
},
"settings.billing.pyro.resubscribe.error.title": {
"message": "Yeniden abone olurken hata"
},
+76 -4
View File
@@ -407,6 +407,81 @@
"collection.title": {
"message": "{name} - Bộ sưu tập"
},
"conversation-thread.action.add-private-note": {
"message": "Thêm ghi chú bí mật"
},
"conversation-thread.action.approve": {
"message": "Chấp thuận"
},
"conversation-thread.action.approve-with-reply": {
"message": "Chấp thuận với phản hồi"
},
"conversation-thread.action.close-thread": {
"message": "Đóng luồng"
},
"conversation-thread.action.close-with-reply": {
"message": "Đóng với phản hồi"
},
"conversation-thread.action.reject": {
"message": "Từ chối"
},
"conversation-thread.action.reject-with-reply": {
"message": "Từ chối với phản hồi"
},
"conversation-thread.action.reopen-thread": {
"message": "Mở lại luồng"
},
"conversation-thread.action.reply": {
"message": "Phản hồi"
},
"conversation-thread.action.reply-to-thread": {
"message": "Phản hồi đến luồng"
},
"conversation-thread.action.resubmit-for-review": {
"message": "Gửi lại để xét duyệt"
},
"conversation-thread.action.resubmit-for-review-with-reply": {
"message": "Gửi lại để xét duyệt kèm phản hồi"
},
"conversation-thread.action.send": {
"message": "Gửi"
},
"conversation-thread.action.send-to-review": {
"message": "Gửi để xem xét"
},
"conversation-thread.action.send-to-review-with-reply": {
"message": "Gửi để xem xét với phản hồi"
},
"conversation-thread.action.set-to-draft": {
"message": "Chuyển sang bản nháp"
},
"conversation-thread.action.set-to-draft-with-reply": {
"message": "Chuyển sang bản nháp kèm phản hồi"
},
"conversation-thread.action.withhold": {
"message": "Thu hồi"
},
"conversation-thread.action.withhold-with-reply": {
"message": "Thu hồi với phản hồi"
},
"conversation-thread.closed-thread.description": {
"message": "Luồng này đã bị đóng và tin nhắn mới không thể gửi được vào."
},
"conversation-thread.error.closing-report": {
"message": "Lỗi khi đóng báo cáo"
},
"conversation-thread.error.reopening-report": {
"message": "Lỗi khi mở lại báo cáo"
},
"conversation-thread.error.sending-message": {
"message": "Lỗi khi gửi tin nhắn"
},
"conversation-thread.reply-editor.placeholder.reply": {
"message": "Đang phản hồi vào luồng..."
},
"conversation-thread.reply-editor.placeholder.send": {
"message": "Gửi một tin nhắn..."
},
"create-project-version.create-modal.stage.add-files.admonition": {
"message": "Các tệp bổ trợ dùng cho các tài nguyên hỗ trợ như mã nguồn, không dùng cho các phiên bản hoặc biến thể thay thế."
},
@@ -768,7 +843,7 @@
"message": "Mạng"
},
"dashboard.creator-withdraw-modal.nearing-threshold": {
"message": "Bạn sắp chạm đến ngưỡng rút tiền. Bạn có thể rút <b>{amountRemaining}<b> ngay bây giờ, nhưng cần có biểu mẫu thuế để rút thêm."
"message": "Bạn sắp chạm đến ngưỡng rút tiền. Bạn có thể rút <b>{amountRemaining}</b> ngay bây giờ, nhưng cần có biểu mẫu thuế để rút thêm."
},
"dashboard.creator-withdraw-modal.paypal-details.account": {
"message": "Tài khoản"
@@ -1199,9 +1274,6 @@
"hosting-marketing.faq.location": {
"message": "Những máy chủ Modrinth Hosting được nằm ở đâu? Tôi có thể chọn khu vực không?"
},
"hosting-marketing.faq.location.answer": {
"message": "Chúng tôi có các máy chủ có sẵn ở Bắc Mỹ, Châu Âu và Đông Nam Á tại thời điểm này mà bạn có thể chọn khi mua. Nhiều khu vực sẽ đến trong tương lai! Nếu bạn muốn chuyển đổi khu vực của mình, vui lòng liên hệ với bộ phận hỗ trợ."
},
"hosting-marketing.faq.versions-loaders": {
"message": "Những phiên bản Minecraft và modloader nào có thể được sử dụng?"
},
+3 -3
View File
@@ -1391,9 +1391,6 @@
"hosting-marketing.faq.location": {
"message": "Modrinth Hosting 伺服器位於哪裡?我可以選擇區域嗎?"
},
"hosting-marketing.faq.location.answer": {
"message": "我們目前在北美、歐洲與東南亞設有伺服器,你可以在購買時選擇。未來還會推出更多區域!如果你想切換區域,請聯絡支援團隊。"
},
"hosting-marketing.faq.versions-loaders": {
"message": "可以使用哪些 Minecraft 版本與載入器?"
},
@@ -3056,6 +3053,9 @@
"search.filter.locked.server.sync": {
"message": "與伺服器同步"
},
"servers.manage.content.title": {
"message": "內容 - {serverName} - Modrinth"
},
"servers.notice.actions": {
"message": "動作"
},
@@ -1,10 +0,0 @@
const COLLECTION_PREFIX = '/collection/bLYCa4PJ'
export default defineNuxtRouteMiddleware((to) => {
if (to.path === COLLECTION_PREFIX || to.path.startsWith(`${COLLECTION_PREFIX}/`)) {
return navigateTo(`https://april-fools-2026.modrinth.com${to.fullPath}`, {
external: true,
redirectCode: 302,
})
}
})
@@ -136,7 +136,7 @@
</ButtonStyled>
</div>
<div v-else class="input-group mt-2">
<ButtonStyled v-if="primaryFile && !currentMember" color="brand">
<ButtonStyled v-if="primaryFile?.url && !currentMember" color="brand">
<a
v-tooltip="primaryFile.filename + ' (' + formatBytes(primaryFile.size) + ')'"
:href="decoratedPrimaryFileUrl"
+12 -14
View File
@@ -515,6 +515,16 @@ function goToPage(page: number) {
currentPage.value = page
}
function notifySkippedProjects(skippedCount: number) {
if (skippedCount <= 0) return
addNotification({
title: 'Skipped projects',
text: `Skipped ${skippedCount} project(s) already moderated or locked by others.`,
type: 'info',
autoCloseMs: 2000,
})
}
async function findFirstEligibleProject(): Promise<ModerationProject | null> {
let skippedCount = 0
@@ -539,13 +549,7 @@ async function findFirstEligibleProject(): Promise<ModerationProject | null> {
const lockStatus = await moderationQueue.checkLock(currentId)
if (!lockStatus.locked || lockStatus.expired || lockStatus.is_own_lock) {
if (skippedCount > 0) {
addNotification({
title: 'Skipped projects',
text: `Skipped ${skippedCount} project(s) already moderated or locked by others.`,
type: 'info',
})
}
notifySkippedProjects(skippedCount)
return project
}
@@ -556,13 +560,7 @@ async function findFirstEligibleProject(): Promise<ModerationProject | null> {
}
}
if (skippedCount > 0) {
addNotification({
title: 'Skipped projects',
text: `Skipped ${skippedCount} project(s) already moderated or locked by others.`,
type: 'info',
})
}
notifySkippedProjects(skippedCount)
return null
}
@@ -0,0 +1,22 @@
{
"db_name": "PostgreSQL",
"query": "\n SELECT id\n FROM versions\n WHERE mod_id = ANY($1)\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Int8"
}
],
"parameters": {
"Left": [
"Int8Array"
]
},
"nullable": [
false
]
},
"hash": "12fa322e09465aab925ac33f8b2a1371fb63be744f1d87c68229342ffadbe998"
}
@@ -1,37 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "SELECT\n WIDTH_BUCKET(\n EXTRACT(EPOCH FROM created)::bigint,\n EXTRACT(EPOCH FROM $1::timestamp with time zone AT TIME ZONE 'UTC')::bigint,\n EXTRACT(EPOCH FROM $2::timestamp with time zone AT TIME ZONE 'UTC')::bigint,\n $3::integer\n ) AS bucket,\n mod_id,\n SUM(amount) amount_sum\n FROM payouts_values\n WHERE\n -- only project revenue is counted here\n -- for affiliate code revenue, see `affiliate_code_revenue`\n payouts_values.mod_id IS NOT NULL\n AND payouts_values.mod_id = ANY($4)\n AND created BETWEEN $1 AND $2\n GROUP BY bucket, mod_id",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "bucket",
"type_info": "Int4"
},
{
"ordinal": 1,
"name": "mod_id",
"type_info": "Int8"
},
{
"ordinal": 2,
"name": "amount_sum",
"type_info": "Numeric"
}
],
"parameters": {
"Left": [
"Timestamptz",
"Timestamptz",
"Int4",
"Int8Array"
]
},
"nullable": [
null,
true,
null
]
},
"hash": "8d38218e5a0c9297be7c6c77acf40a2339b12ff15f1f9e53a27a1c599a33e43b"
}
@@ -1,38 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "SELECT\n WIDTH_BUCKET(\n EXTRACT(EPOCH FROM usa.created_at)::bigint,\n EXTRACT(EPOCH FROM $1::timestamp with time zone AT TIME ZONE 'UTC')::bigint,\n EXTRACT(EPOCH FROM $2::timestamp with time zone AT TIME ZONE 'UTC')::bigint,\n $3::integer\n ) AS bucket,\n CASE WHEN $5 THEN affiliate_code ELSE 0 END AS affiliate_code,\n COUNT(*) AS conversions\n FROM users_subscriptions_affiliations usa\n INNER JOIN affiliate_codes ac ON ac.id = usa.affiliate_code\n INNER JOIN users_subscriptions us ON us.id = usa.subscription_id\n INNER JOIN charges c ON c.subscription_id = us.id\n WHERE\n ac.affiliate = $4\n AND usa.created_at BETWEEN $1 AND $2\n AND c.status = 'succeeded'\n GROUP BY bucket, affiliate_code",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "bucket",
"type_info": "Int4"
},
{
"ordinal": 1,
"name": "affiliate_code",
"type_info": "Int8"
},
{
"ordinal": 2,
"name": "conversions",
"type_info": "Int8"
}
],
"parameters": {
"Left": [
"Timestamptz",
"Timestamptz",
"Int4",
"Int8",
"Bool"
]
},
"nullable": [
null,
null,
null
]
},
"hash": "9152c0d7e7f508491b601c16c6eed05e2333475e96007180acda6086ee2825c0"
}
@@ -0,0 +1,22 @@
{
"db_name": "PostgreSQL",
"query": "\n SELECT m.id\n FROM mods m\n WHERE m.organization_id = ANY($1)\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "id",
"type_info": "Int8"
}
],
"parameters": {
"Left": [
"Int8Array"
]
},
"nullable": [
false
]
},
"hash": "9cabb8fd373e6ebf76e6d6a6711e83b71b766d64e05cecbfab58194eff89ec08"
}
@@ -1,38 +0,0 @@
{
"db_name": "PostgreSQL",
"query": "SELECT\n WIDTH_BUCKET(\n EXTRACT(EPOCH FROM created)::bigint,\n EXTRACT(EPOCH FROM $1::timestamp with time zone AT TIME ZONE 'UTC')::bigint,\n EXTRACT(EPOCH FROM $2::timestamp with time zone AT TIME ZONE 'UTC')::bigint,\n $3::integer\n ) AS bucket,\n CASE WHEN $5 THEN affiliate_code_source ELSE 0 END AS affiliate_code_source,\n SUM(amount) amount_sum\n FROM payouts_values\n WHERE\n user_id = $4\n AND payouts_values.affiliate_code_source IS NOT NULL\n AND created BETWEEN $1 AND $2\n GROUP BY bucket, affiliate_code_source",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "bucket",
"type_info": "Int4"
},
{
"ordinal": 1,
"name": "affiliate_code_source",
"type_info": "Int8"
},
{
"ordinal": 2,
"name": "amount_sum",
"type_info": "Numeric"
}
],
"parameters": {
"Left": [
"Timestamptz",
"Timestamptz",
"Int4",
"Int8",
"Bool"
]
},
"nullable": [
null,
null,
null
]
},
"hash": "eeea6cad39d645d3f5a0a4115c8350e08b7850a09a86c62d0de371a1caed7c07"
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,418 @@
use std::collections::HashSet;
use actix_web::{HttpRequest, post, web};
use serde::Serialize;
use super::{DownloadSource, GetRequest, normalize_download_source};
use crate::{
auth::get_user_from_headers,
database::{
PgPool,
models::{DBProjectId, DBUser, DBVersionId},
redis::RedisPool,
},
models::{ids::VersionId, pats::Scopes, v3::analytics::DownloadReason},
queue::session::AuthQueue,
routes::ApiError,
};
pub fn config(cfg: &mut utoipa_actix_web::service_config::ServiceConfig) {
cfg.service(fetch_facets);
}
#[derive(Debug, Serialize, utoipa::ToSchema)]
pub struct FacetsResponse {
pub facets: AnalyticsFacets,
}
#[derive(Debug, Default, Serialize, utoipa::ToSchema)]
pub struct AnalyticsFacets {
pub project_views: ProjectViewsFacets,
pub project_downloads: ProjectDownloadsFacets,
pub project_playtime: ProjectPlaytimeFacets,
}
#[derive(Debug, Default, Serialize, utoipa::ToSchema)]
pub struct ProjectViewsFacets {
pub domain: Vec<String>,
pub site_path: Vec<String>,
pub monetized: Vec<bool>,
pub country: Vec<String>,
}
#[derive(Debug, Default, Serialize, utoipa::ToSchema)]
pub struct ProjectDownloadsFacets {
pub domain: Vec<String>,
pub user_agent: Vec<DownloadSource>,
pub version_id: Vec<VersionId>,
pub monetized: Vec<bool>,
pub country: Vec<String>,
pub reason: Vec<DownloadReason>,
pub game_version: Vec<String>,
pub loader: Vec<String>,
}
#[derive(Debug, Default, Serialize, utoipa::ToSchema)]
pub struct ProjectPlaytimeFacets {
pub version_id: Vec<VersionId>,
pub loader: Vec<String>,
pub game_version: Vec<String>,
pub country: Vec<String>,
}
#[derive(Debug, clickhouse::Row, serde::Deserialize)]
struct StringFacetRow {
value: String,
}
#[derive(Debug, clickhouse::Row, serde::Deserialize)]
struct VersionFacetRow {
value: DBVersionId,
}
#[derive(Debug, clickhouse::Row, serde::Deserialize)]
struct BoolFacetRow {
value: bool,
}
#[utoipa::path(
responses((status = OK, body = inline(FacetsResponse))),
)]
#[post("/facets")]
pub async fn fetch_facets(
http_req: HttpRequest,
req: web::Json<GetRequest>,
pool: web::Data<PgPool>,
redis: web::Data<RedisPool>,
session_queue: web::Data<AuthQueue>,
clickhouse: web::Data<clickhouse::Client>,
) -> Result<web::Json<FacetsResponse>, ApiError> {
let user = get_user_from_headers(
&http_req,
&**pool,
&redis,
&session_queue,
Scopes::ANALYTICS,
)
.await?
.1;
let project_ids = if req.project_ids.is_empty() {
DBUser::get_projects(user.id.into(), &**pool, &redis).await?
} else {
req.project_ids
.iter()
.map(|id| DBProjectId::from(*id))
.collect::<Vec<_>>()
};
let project_ids =
super::filter_allowed_project_ids(&project_ids, &user, &pool, &redis)
.await?;
let parent_version_ids =
fetch_project_version_ids(&project_ids, &pool).await?;
Ok(web::Json(FacetsResponse {
facets: AnalyticsFacets {
project_views: fetch_project_views_facets(
&clickhouse,
&project_ids,
)
.await?,
project_downloads: fetch_project_downloads_facets(
&clickhouse,
&project_ids,
)
.await?,
project_playtime: fetch_project_playtime_facets(
&clickhouse,
&project_ids,
&parent_version_ids,
)
.await?,
},
}))
}
async fn fetch_project_version_ids(
project_ids: &[DBProjectId],
pool: &PgPool,
) -> Result<Vec<DBVersionId>, ApiError> {
let project_id_values =
project_ids.iter().map(|id| id.0).collect::<Vec<_>>();
Ok(sqlx::query!(
"
SELECT id
FROM versions
WHERE mod_id = ANY($1)
",
&project_id_values,
)
.fetch_all(pool)
.await?
.into_iter()
.map(|row| DBVersionId(row.id))
.collect())
}
async fn fetch_project_views_facets(
clickhouse: &clickhouse::Client,
project_ids: &[DBProjectId],
) -> Result<ProjectViewsFacets, ApiError> {
Ok(ProjectViewsFacets {
domain: fetch_string_facet(
clickhouse,
"SELECT DISTINCT domain AS value FROM views WHERE project_id IN {project_ids: Array(UInt64)} AND domain != '' ORDER BY value",
project_ids,
)
.await?,
site_path: fetch_string_facet(
clickhouse,
"SELECT DISTINCT site_path AS value FROM views WHERE project_id IN {project_ids: Array(UInt64)} AND site_path != '' ORDER BY value",
project_ids,
)
.await?,
monetized: fetch_bool_facet(
clickhouse,
"SELECT DISTINCT monetized AS value FROM views WHERE project_id IN {project_ids: Array(UInt64)} ORDER BY value",
project_ids,
)
.await?,
country: fetch_string_facet(
clickhouse,
"SELECT DISTINCT country AS value FROM views WHERE project_id IN {project_ids: Array(UInt64)} AND country != '' ORDER BY value",
project_ids,
)
.await?,
})
}
async fn fetch_project_downloads_facets(
clickhouse: &clickhouse::Client,
project_ids: &[DBProjectId],
) -> Result<ProjectDownloadsFacets, ApiError> {
let user_agents = fetch_string_facet(
clickhouse,
"SELECT DISTINCT user_agent AS value FROM downloads WHERE project_id IN {project_ids: Array(UInt64)} AND user_agent != ''",
project_ids,
)
.await?;
let user_agent = normalize_download_source_facets(&user_agents);
Ok(ProjectDownloadsFacets {
domain: fetch_string_facet(
clickhouse,
"SELECT DISTINCT domain AS value FROM downloads WHERE project_id IN {project_ids: Array(UInt64)} AND domain != '' ORDER BY value",
project_ids,
)
.await?,
user_agent,
version_id: fetch_version_facet(
clickhouse,
"SELECT DISTINCT version_id AS value FROM downloads WHERE project_id IN {project_ids: Array(UInt64)} AND version_id != 0 ORDER BY value",
project_ids,
)
.await?,
monetized: fetch_bool_facet(
clickhouse,
"SELECT DISTINCT user_id != 0 AS value FROM downloads WHERE project_id IN {project_ids: Array(UInt64)} ORDER BY value",
project_ids,
)
.await?,
country: fetch_string_facet(
clickhouse,
"SELECT DISTINCT country AS value FROM downloads WHERE project_id IN {project_ids: Array(UInt64)} AND country != '' ORDER BY value",
project_ids,
)
.await?,
reason: fetch_string_facet(
clickhouse,
"SELECT DISTINCT reason AS value FROM downloads WHERE project_id IN {project_ids: Array(UInt64)} AND reason != '' ORDER BY value",
project_ids,
)
.await?
.into_iter()
.filter_map(|reason| reason.parse().ok())
.collect(),
game_version: fetch_string_facet(
clickhouse,
"SELECT DISTINCT game_version AS value FROM downloads WHERE project_id IN {project_ids: Array(UInt64)} AND game_version != '' ORDER BY value",
project_ids,
)
.await?,
loader: fetch_string_facet(
clickhouse,
"SELECT DISTINCT loader AS value FROM downloads WHERE project_id IN {project_ids: Array(UInt64)} AND loader != '' ORDER BY value",
project_ids,
)
.await?,
})
}
fn normalize_download_source_facets(
user_agents: &[String],
) -> Vec<DownloadSource> {
user_agents
.iter()
.filter_map(|user_agent| normalize_download_source(user_agent))
.collect::<HashSet<_>>()
.into_iter()
.collect()
}
async fn fetch_project_playtime_facets(
clickhouse: &clickhouse::Client,
project_ids: &[DBProjectId],
parent_version_ids: &[DBVersionId],
) -> Result<ProjectPlaytimeFacets, ApiError> {
Ok(ProjectPlaytimeFacets {
version_id: fetch_playtime_version_facet(
clickhouse,
project_ids,
parent_version_ids,
)
.await?,
loader: fetch_playtime_string_facet(
clickhouse,
"loader",
project_ids,
parent_version_ids,
)
.await?,
game_version: fetch_playtime_string_facet(
clickhouse,
"game_version",
project_ids,
parent_version_ids,
)
.await?,
country: fetch_playtime_string_facet(
clickhouse,
"country",
project_ids,
parent_version_ids,
)
.await?,
})
}
async fn fetch_string_facet(
clickhouse: &clickhouse::Client,
query: &str,
project_ids: &[DBProjectId],
) -> Result<Vec<String>, ApiError> {
let mut rows = clickhouse
.query(query)
.param("project_ids", project_ids)
.fetch::<StringFacetRow>()?;
let mut values = Vec::new();
while let Some(row) = rows.next().await? {
values.push(row.value);
}
Ok(values)
}
async fn fetch_version_facet(
clickhouse: &clickhouse::Client,
query: &str,
project_ids: &[DBProjectId],
) -> Result<Vec<VersionId>, ApiError> {
let mut rows = clickhouse
.query(query)
.param("project_ids", project_ids)
.fetch::<VersionFacetRow>()?;
let mut values = Vec::new();
while let Some(row) = rows.next().await? {
values.push(row.value.into());
}
Ok(values)
}
async fn fetch_bool_facet(
clickhouse: &clickhouse::Client,
query: &str,
project_ids: &[DBProjectId],
) -> Result<Vec<bool>, ApiError> {
let mut rows = clickhouse
.query(query)
.param("project_ids", project_ids)
.fetch::<BoolFacetRow>()?;
let mut values = Vec::new();
while let Some(row) = rows.next().await? {
values.push(row.value);
}
Ok(values)
}
async fn fetch_playtime_string_facet(
clickhouse: &clickhouse::Client,
column: &str,
project_ids: &[DBProjectId],
parent_version_ids: &[DBVersionId],
) -> Result<Vec<String>, ApiError> {
let query = format!(
"SELECT DISTINCT {column} AS value
FROM playtime
WHERE (project_id IN {{project_ids: Array(UInt64)}} OR parent IN {{parent_version_ids: Array(UInt64)}})
AND {column} != ''
ORDER BY value"
);
let mut rows = clickhouse
.query(&query)
.param("project_ids", project_ids)
.param("parent_version_ids", parent_version_ids)
.fetch::<StringFacetRow>()?;
let mut values = Vec::new();
while let Some(row) = rows.next().await? {
values.push(row.value);
}
Ok(values)
}
async fn fetch_playtime_version_facet(
clickhouse: &clickhouse::Client,
project_ids: &[DBProjectId],
parent_version_ids: &[DBVersionId],
) -> Result<Vec<VersionId>, ApiError> {
let mut rows = clickhouse
.query(
"SELECT DISTINCT version_id AS value
FROM playtime
WHERE (project_id IN {project_ids: Array(UInt64)} OR parent IN {parent_version_ids: Array(UInt64)})
AND version_id != 0
ORDER BY value",
)
.param("project_ids", project_ids)
.param("parent_version_ids", parent_version_ids)
.fetch::<VersionFacetRow>()?;
let mut values = Vec::new();
while let Some(row) = rows.next().await? {
values.push(row.value.into());
}
Ok(values)
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn user_agent_facets_use_normalized_sources() {
let user_agents = vec![
"MultiMC/5.0".to_string(),
"MultiMC/6.0".to_string(),
"PrismLauncher/6.1".to_string(),
"curl/8.7.1".to_string(),
"Mozilla/5.0 AppleWebKit/537.36".to_string(),
];
assert_eq!(
normalize_download_source_facets(&user_agents),
vec![
DownloadSource::Named("MultiMC".into()),
DownloadSource::Named("Prism Launcher".into()),
DownloadSource::Website,
],
);
}
}
@@ -0,0 +1,102 @@
use const_format::formatcp;
use serde::{Deserialize, Serialize};
use crate::{
database::models::DBAffiliateCodeId, models::ids::AffiliateCodeId,
routes::ApiError,
};
use super::super::{
ClickhouseFilterParam, ClickhouseQueryParams, QueryClickhouseContext,
query_clickhouse,
};
use super::{
AffiliateCodeAnalytics, AffiliateCodeMetrics, AnalyticsData, Metrics,
};
const TIME_RANGE_START: &str = "{time_range_start: UInt64}";
const TIME_RANGE_END: &str = "{time_range_end: UInt64}";
const TIME_SLICES: &str = "{time_slices: UInt64}";
/// Fields for [`super::ReturnMetrics::affiliate_code_clicks`].
#[derive(
Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, utoipa::ToSchema,
)]
#[serde(rename_all = "snake_case")]
pub enum AffiliateCodeClicksField {
/// Affiliate code ID.
AffiliateCodeId,
}
/// Filters for [`super::ReturnMetrics::affiliate_code_clicks`].
#[derive(Debug, Clone, Default, Serialize, Deserialize, utoipa::ToSchema)]
pub struct AffiliateCodeClicksFilters {
/// Affiliate code IDs to include.
#[serde(default)]
pub affiliate_code_id: Vec<AffiliateCodeId>,
}
/// [`super::ReturnMetrics::affiliate_code_clicks`].
#[derive(Debug, Clone, Default, Serialize, Deserialize, utoipa::ToSchema)]
pub struct AffiliateCodeClicks {
/// Total clicks for this bucket.
pub clicks: u64,
}
#[derive(Debug, clickhouse::Row, serde::Deserialize)]
struct AffiliateCodeClickRow {
bucket: u64,
affiliate_code_id: DBAffiliateCodeId,
clicks: u64,
}
const AFFILIATE_CODE_CLICKS: &str = {
const USE_AFFILIATE_CODE_ID: &str = "{use_affiliate_code_id: Bool}";
const FILTER_AFFILIATE_CODE_ID: &str =
"{filter_affiliate_code_id: Array(UInt64)}";
formatcp!(
"SELECT
widthBucket(toUnixTimestamp(recorded), {TIME_RANGE_START}, {TIME_RANGE_END}, {TIME_SLICES}) AS bucket,
if({USE_AFFILIATE_CODE_ID}, affiliate_code_id, 0) AS affiliate_code_id,
COUNT(*) AS clicks
FROM affiliate_code_clicks
WHERE
recorded BETWEEN {TIME_RANGE_START} AND {TIME_RANGE_END}
-- make sure that the REAL affiliate code id is included,
-- not the possibly-zero one,
-- by using `affiliate_code_clicks.affiliate_code_id` instead of `project_id`
AND (empty({FILTER_AFFILIATE_CODE_ID}) OR affiliate_code_id IN {FILTER_AFFILIATE_CODE_ID})
GROUP BY bucket, affiliate_code_id"
)
};
pub(crate) async fn fetch(
cx: &mut QueryClickhouseContext<'_>,
metrics: &Metrics<AffiliateCodeClicksField, AffiliateCodeClicksFilters>,
) -> Result<(), ApiError> {
use AffiliateCodeClicksField as F;
let uses = |field| metrics.bucket_by.contains(&field);
query_clickhouse::<AffiliateCodeClickRow>(
cx,
AFFILIATE_CODE_CLICKS,
ClickhouseQueryParams::empty(),
&[("use_affiliate_code_id", uses(F::AffiliateCodeId))],
vec![ClickhouseFilterParam::AffiliateCodeId(
"filter_affiliate_code_id",
&metrics.filter_by.affiliate_code_id,
)],
|_| true,
|row| row.bucket,
|row| {
AnalyticsData::AffiliateCode(AffiliateCodeAnalytics {
source_affiliate_code: row.affiliate_code_id.into(),
metrics: AffiliateCodeMetrics::Clicks(AffiliateCodeClicks {
clicks: row.clicks,
}),
})
},
)
.await
}
@@ -0,0 +1,125 @@
use futures::StreamExt;
use serde::{Deserialize, Serialize};
use sqlx::Row;
use crate::{
database::{
PgPool,
models::{DBAffiliateCodeId, DBUserId},
},
models::ids::AffiliateCodeId,
routes::ApiError,
util::error::Context,
};
use super::super::{TimeSlice, add_to_time_slice};
use super::{
AffiliateCodeAnalytics, AffiliateCodeMetrics, AnalyticsData, Metrics,
};
/// Fields for [`super::ReturnMetrics::affiliate_code_conversions`].
#[derive(
Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, utoipa::ToSchema,
)]
#[serde(rename_all = "snake_case")]
pub enum AffiliateCodeConversionsField {
/// Affiliate code ID.
AffiliateCodeId,
}
/// Filters for [`super::ReturnMetrics::affiliate_code_conversions`].
#[derive(Debug, Clone, Default, Serialize, Deserialize, utoipa::ToSchema)]
pub struct AffiliateCodeConversionsFilters {
/// Affiliate code IDs to include.
#[serde(default)]
pub affiliate_code_id: Vec<AffiliateCodeId>,
}
/// [`super::ReturnMetrics::affiliate_code_conversions`].
#[derive(Debug, Clone, Default, Serialize, Deserialize, utoipa::ToSchema)]
pub struct AffiliateCodeConversions {
/// Total conversions for this bucket.
pub conversions: u64,
}
pub(crate) async fn fetch(
pool: &PgPool,
time_slices: &mut [TimeSlice],
req: &super::super::GetRequest,
user_id: DBUserId,
num_time_slices: usize,
metrics: &Metrics<
AffiliateCodeConversionsField,
AffiliateCodeConversionsFilters,
>,
) -> Result<(), ApiError> {
let filter_affiliate_code_ids = metrics
.filter_by
.affiliate_code_id
.iter()
.map(|id| DBAffiliateCodeId::from(*id).0)
.collect::<Vec<_>>();
let mut rows = sqlx::query(
"SELECT
WIDTH_BUCKET(
EXTRACT(EPOCH FROM usa.created_at)::bigint,
EXTRACT(EPOCH FROM $1::timestamp with time zone AT TIME ZONE 'UTC')::bigint,
EXTRACT(EPOCH FROM $2::timestamp with time zone AT TIME ZONE 'UTC')::bigint,
$3::integer
) AS bucket,
CASE WHEN $5 THEN affiliate_code ELSE 0 END AS affiliate_code,
COUNT(*) AS conversions
FROM users_subscriptions_affiliations usa
INNER JOIN affiliate_codes ac ON ac.id = usa.affiliate_code
INNER JOIN users_subscriptions us ON us.id = usa.subscription_id
INNER JOIN charges c ON c.subscription_id = us.id
WHERE
ac.affiliate = $4
AND usa.created_at BETWEEN $1 AND $2
AND c.status = 'succeeded'
AND (cardinality($6::bigint[]) = 0 OR affiliate_code = ANY($6))
GROUP BY bucket, affiliate_code",
)
.bind(req.time_range.start)
.bind(req.time_range.end)
.bind(num_time_slices as i64)
.bind(user_id as DBUserId)
.bind(
metrics
.bucket_by
.contains(&AffiliateCodeConversionsField::AffiliateCodeId),
)
.bind(&filter_affiliate_code_ids)
.fetch(pool);
while let Some(row) = rows.next().await.transpose()? {
let bucket = row
.try_get::<Option<i32>, _>("bucket")?
.wrap_internal_err("bucket should be non-null - query bug!")?;
let bucket = usize::try_from(bucket).wrap_internal_err_with(|| {
eyre::eyre!(
"bucket value {bucket} does not fit into `usize` - query bug!"
)
})?;
let affiliate_code = row.try_get::<Option<i64>, _>("affiliate_code")?;
let conversion_count = row.try_get::<Option<i64>, _>("conversions")?;
let source_affiliate_code = AffiliateCodeId::from(DBAffiliateCodeId(
affiliate_code.unwrap_or_default(),
));
let conversions = u64::try_from(conversion_count.unwrap_or_default())
.unwrap_or(u64::MAX);
add_to_time_slice(
time_slices,
bucket,
AnalyticsData::AffiliateCode(AffiliateCodeAnalytics {
source_affiliate_code,
metrics: AffiliateCodeMetrics::Conversions(
AffiliateCodeConversions { conversions },
),
}),
)?;
}
Ok(())
}
@@ -0,0 +1,121 @@
use futures::StreamExt;
use rust_decimal::Decimal;
use serde::{Deserialize, Serialize};
use sqlx::Row;
use crate::{
database::{
PgPool,
models::{DBAffiliateCodeId, DBUserId},
},
models::ids::AffiliateCodeId,
routes::ApiError,
util::error::Context,
};
use super::super::{TimeSlice, add_to_time_slice};
use super::{
AffiliateCodeAnalytics, AffiliateCodeMetrics, AnalyticsData, Metrics,
};
/// Fields for [`super::ReturnMetrics::affiliate_code_revenue`].
#[derive(
Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, utoipa::ToSchema,
)]
#[serde(rename_all = "snake_case")]
pub enum AffiliateCodeRevenueField {
/// Affiliate code ID.
AffiliateCodeId,
}
/// Filters for [`super::ReturnMetrics::affiliate_code_revenue`].
#[derive(Debug, Clone, Default, Serialize, Deserialize, utoipa::ToSchema)]
pub struct AffiliateCodeRevenueFilters {
/// Affiliate code IDs to include.
#[serde(default)]
pub affiliate_code_id: Vec<AffiliateCodeId>,
}
/// [`super::ReturnMetrics::affiliate_code_revenue`].
#[derive(Debug, Clone, Default, Serialize, Deserialize, utoipa::ToSchema)]
pub struct AffiliateCodeRevenue {
/// Total revenue for this bucket.
pub revenue: Decimal,
}
pub(crate) async fn fetch(
pool: &PgPool,
time_slices: &mut [TimeSlice],
req: &super::super::GetRequest,
user_id: DBUserId,
num_time_slices: usize,
metrics: &Metrics<AffiliateCodeRevenueField, AffiliateCodeRevenueFilters>,
) -> Result<(), ApiError> {
let filter_affiliate_code_ids = metrics
.filter_by
.affiliate_code_id
.iter()
.map(|id| DBAffiliateCodeId::from(*id).0)
.collect::<Vec<_>>();
let mut rows = sqlx::query(
"SELECT
WIDTH_BUCKET(
EXTRACT(EPOCH FROM created)::bigint,
EXTRACT(EPOCH FROM $1::timestamp with time zone AT TIME ZONE 'UTC')::bigint,
EXTRACT(EPOCH FROM $2::timestamp with time zone AT TIME ZONE 'UTC')::bigint,
$3::integer
) AS bucket,
CASE WHEN $5 THEN affiliate_code_source ELSE 0 END AS affiliate_code_source,
SUM(amount) amount_sum
FROM payouts_values
WHERE
user_id = $4
AND payouts_values.affiliate_code_source IS NOT NULL
AND created BETWEEN $1 AND $2
AND (cardinality($6::bigint[]) = 0 OR affiliate_code_source = ANY($6))
GROUP BY bucket, affiliate_code_source",
)
.bind(req.time_range.start)
.bind(req.time_range.end)
.bind(num_time_slices as i64)
.bind(user_id as DBUserId)
.bind(
metrics
.bucket_by
.contains(&AffiliateCodeRevenueField::AffiliateCodeId),
)
.bind(&filter_affiliate_code_ids)
.fetch(pool);
while let Some(row) = rows.next().await.transpose()? {
let bucket = row
.try_get::<Option<i32>, _>("bucket")?
.wrap_internal_err("bucket should be non-null - query bug!")?;
let bucket = usize::try_from(bucket).wrap_internal_err_with(|| {
eyre::eyre!(
"bucket value {bucket} does not fit into `usize` - query bug!"
)
})?;
let affiliate_code_source =
row.try_get::<Option<i64>, _>("affiliate_code_source")?;
let source_affiliate_code = AffiliateCodeId::from(DBAffiliateCodeId(
affiliate_code_source.unwrap_or_default(),
));
let revenue = row
.try_get::<Option<Decimal>, _>("amount_sum")?
.unwrap_or_default();
add_to_time_slice(
time_slices,
bucket,
AnalyticsData::AffiliateCode(AffiliateCodeAnalytics {
source_affiliate_code,
metrics: AffiliateCodeMetrics::Revenue(AffiliateCodeRevenue {
revenue,
}),
}),
)?;
}
Ok(())
}
@@ -0,0 +1,152 @@
mod affiliate_code_clicks;
mod affiliate_code_conversions;
mod affiliate_code_revenue;
mod project_downloads;
mod project_playtime;
mod project_revenue;
mod project_views;
use serde::{Deserialize, Serialize};
use crate::models::ids::{AffiliateCodeId, ProjectId};
pub(crate) use affiliate_code_clicks::fetch as fetch_affiliate_code_clicks;
pub use affiliate_code_clicks::{
AffiliateCodeClicks, AffiliateCodeClicksField, AffiliateCodeClicksFilters,
};
pub(crate) use affiliate_code_conversions::fetch as fetch_affiliate_code_conversions;
pub use affiliate_code_conversions::{
AffiliateCodeConversions, AffiliateCodeConversionsField,
AffiliateCodeConversionsFilters,
};
pub(crate) use affiliate_code_revenue::fetch as fetch_affiliate_code_revenue;
pub use affiliate_code_revenue::{
AffiliateCodeRevenue, AffiliateCodeRevenueField,
AffiliateCodeRevenueFilters,
};
pub use project_downloads::{
DownloadSource, ProjectDownloads, ProjectDownloadsField,
ProjectDownloadsFilters,
};
pub(crate) use project_downloads::{
fetch as fetch_project_downloads, normalize_download_source,
};
pub(crate) use project_playtime::fetch as fetch_project_playtime;
pub use project_playtime::{
ProjectPlaytime, ProjectPlaytimeField, ProjectPlaytimeFilters,
};
pub(crate) use project_revenue::fetch as fetch_project_revenue;
pub use project_revenue::{
ProjectRevenue, ProjectRevenueField, ProjectRevenueFilters,
};
pub(crate) use project_views::fetch as fetch_project_views;
pub use project_views::{ProjectViews, ProjectViewsField, ProjectViewsFilters};
/// What metrics the caller would like to receive from this analytics get
/// request.
#[derive(Debug, Default, Serialize, Deserialize, utoipa::ToSchema)]
pub struct ReturnMetrics {
/// How many times a project page has been viewed.
pub project_views: Option<Metrics<ProjectViewsField, ProjectViewsFilters>>,
/// How many times a project has been downloaded.
pub project_downloads:
Option<Metrics<ProjectDownloadsField, ProjectDownloadsFilters>>,
/// How long users have been playing a project.
pub project_playtime:
Option<Metrics<ProjectPlaytimeField, ProjectPlaytimeFilters>>,
/// How much payout revenue a project has generated.
pub project_revenue:
Option<Metrics<ProjectRevenueField, ProjectRevenueFilters>>,
/// How many times an affiliate code has been clicked.
pub affiliate_code_clicks:
Option<Metrics<AffiliateCodeClicksField, AffiliateCodeClicksFilters>>,
/// How many times a product has been purchased with an affiliate code.
pub affiliate_code_conversions: Option<
Metrics<AffiliateCodeConversionsField, AffiliateCodeConversionsFilters>,
>,
/// How much payout revenue an affiliate code has generated.
pub affiliate_code_revenue:
Option<Metrics<AffiliateCodeRevenueField, AffiliateCodeRevenueFilters>>,
}
/// See [`ReturnMetrics`].
#[derive(Debug, Serialize, Deserialize, utoipa::ToSchema)]
pub struct Metrics<BucketBy, FilterBy> {
/// When collecting metrics, what fields do we want to group the results by?
///
/// For example, if we have two views entries:
/// - `{ "project_id": "abcdefgh", "domain": "youtube.com", "count": 5 }`
/// - `{ "project_id": "abcdefgh", "domain": "discord.com", "count": 3 }`
///
/// If we bucket by `domain`, then we will get two results:
/// - `{ "project_id": "abcdefgh", "domain": "youtube.com", "count": 5 }`
/// - `{ "project_id": "abcdefgh", "domain": "discord.com", "count": 3 }`
///
/// If we do not bucket by `domain`, we will only get one, which is an
/// aggregate of the two rows:
/// - `{ "project_id": "abcdefgh", "count": 8 }`
#[serde(default = "Vec::default")]
pub bucket_by: Vec<BucketBy>,
/// Filters to apply before aggregating this metric.
///
/// Values within one field are ORed together. Different fields are AND'ed
/// together. An empty list means that field is not filtered.
#[serde(default)]
pub filter_by: FilterBy,
}
/// Metrics collected in a single time slice.
#[derive(Debug, Clone, Serialize, Deserialize, utoipa::ToSchema)]
#[serde(untagged)] // the presence of `source_project`, `source_affiliate_code` determines the kind
pub enum AnalyticsData {
/// Project metrics.
Project(ProjectAnalytics),
AffiliateCode(AffiliateCodeAnalytics),
}
/// Project metrics.
#[derive(Debug, Clone, Serialize, Deserialize, utoipa::ToSchema)]
pub struct ProjectAnalytics {
/// What project these metrics are for.
pub source_project: ProjectId,
/// Metrics collected.
#[serde(flatten)]
pub metrics: ProjectMetrics,
}
/// Project metrics of a specific kind.
///
/// If a field is not included in [`Metrics::bucket_by`], it will be [`None`].
#[derive(Debug, Clone, Serialize, Deserialize, utoipa::ToSchema)]
#[serde(rename_all = "snake_case", tag = "metric_kind")]
pub enum ProjectMetrics {
/// [`ReturnMetrics::project_views`].
Views(ProjectViews),
/// [`ReturnMetrics::project_downloads`].
Downloads(ProjectDownloads),
/// [`ReturnMetrics::project_playtime`].
Playtime(ProjectPlaytime),
/// [`ReturnMetrics::project_revenue`].
Revenue(ProjectRevenue),
}
/// Affiliate code metrics.
#[derive(Debug, Clone, Serialize, Deserialize, utoipa::ToSchema)]
pub struct AffiliateCodeAnalytics {
/// What affiliate code these metrics are for.
pub source_affiliate_code: AffiliateCodeId,
/// Metrics collected.
#[serde(flatten)]
pub metrics: AffiliateCodeMetrics,
}
/// Affiliate code metrics of a specific kind.
///
/// If a field is not included in [`Metrics::bucket_by`], it will be [`None`].
#[derive(Debug, Clone, Serialize, Deserialize, utoipa::ToSchema)]
#[serde(rename_all = "snake_case", tag = "metric_kind")]
pub enum AffiliateCodeMetrics {
Clicks(AffiliateCodeClicks),
Conversions(AffiliateCodeConversions),
Revenue(AffiliateCodeRevenue),
}
@@ -0,0 +1,487 @@
use std::{
collections::HashMap,
sync::{
LazyLock,
atomic::{AtomicUsize, Ordering},
},
};
use const_format::formatcp;
use dashmap::DashMap;
use regex::Regex;
use serde::{Deserialize, Deserializer, Serialize, Serializer, de::Error as _};
use crate::{
database::models::{DBProjectId, DBVersionId},
models::{ids::VersionId, v3::analytics::DownloadReason},
routes::ApiError,
};
use super::super::{
ClickhouseFilterParam, QueryClickhouseContext, add_to_time_slice,
condense_country, none_if_empty, none_if_zero_version_id,
};
use super::{AnalyticsData, Metrics, ProjectAnalytics, ProjectMetrics};
const TIME_RANGE_START: &str = "{time_range_start: UInt64}";
const TIME_RANGE_END: &str = "{time_range_end: UInt64}";
const TIME_SLICES: &str = "{time_slices: UInt64}";
const PROJECT_IDS: &str = "{project_ids: Array(UInt64)}";
/// Fields for [`super::ReturnMetrics::project_downloads`].
#[derive(
Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, utoipa::ToSchema,
)]
#[serde(rename_all = "snake_case")]
pub enum ProjectDownloadsField {
/// Project ID.
ProjectId,
/// Version ID of this project.
VersionId,
/// Referrer domain which linked to this project.
Domain,
/// Normalized user agent used to download this project.
UserAgent,
/// Whether these downloads were monetized or not.
Monetized,
/// What country these downloads came from.
///
/// To anonymize the data, the country may be reported as `XX`.
Country,
/// Download reason.
Reason,
/// Game version used for this download.
GameVersion,
/// Mod loader used for this download.
Loader,
}
/// Filters for [`super::ReturnMetrics::project_downloads`].
#[derive(Debug, Clone, Default, Serialize, Deserialize, utoipa::ToSchema)]
pub struct ProjectDownloadsFilters {
/// Version IDs to include.
#[serde(default)]
pub version_id: Vec<VersionId>,
/// Referrer domains to include.
#[serde(default)]
pub domain: Vec<String>,
/// Normalized download sources to include.
#[serde(default)]
pub user_agent: Vec<DownloadSource>,
/// Monetization states to include.
#[serde(default)]
pub monetized: Vec<bool>,
/// Country codes to include.
#[serde(default)]
pub country: Vec<String>,
/// Download reasons to include.
#[serde(default)]
pub reason: Vec<DownloadReason>,
/// Game versions to include.
#[serde(default)]
pub game_version: Vec<String>,
/// Loaders to include.
#[serde(default)]
pub loader: Vec<String>,
}
/// [`super::ReturnMetrics::project_downloads`].
#[derive(Debug, Clone, Default, Serialize, Deserialize, utoipa::ToSchema)]
pub struct ProjectDownloads {
/// [`ProjectDownloadsField::Domain`].
#[serde(skip_serializing_if = "Option::is_none")]
pub(crate) domain: Option<String>,
/// [`ProjectDownloadsField::UserAgent`].
#[serde(skip_serializing_if = "Option::is_none")]
pub(crate) user_agent: Option<DownloadSource>,
/// [`ProjectDownloadsField::VersionId`].
#[serde(skip_serializing_if = "Option::is_none")]
pub(crate) version_id: Option<VersionId>,
/// [`ProjectDownloadsField::Monetized`].
#[serde(skip_serializing_if = "Option::is_none")]
pub(crate) monetized: Option<bool>,
/// [`ProjectDownloadsField::Country`].
#[serde(skip_serializing_if = "Option::is_none")]
pub(crate) country: Option<String>,
/// [`ProjectDownloadsField::Reason`].
#[serde(skip_serializing_if = "Option::is_none")]
pub(crate) reason: Option<DownloadReason>,
/// [`ProjectDownloadsField::GameVersion`].
#[serde(skip_serializing_if = "Option::is_none")]
pub(crate) game_version: Option<String>,
/// [`ProjectDownloadsField::Loader`].
#[serde(skip_serializing_if = "Option::is_none")]
pub(crate) loader: Option<String>,
/// Total number of downloads for this bucket.
pub(crate) downloads: u64,
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, utoipa::ToSchema)]
pub enum DownloadSource {
Website,
ModrinthApp,
ModrinthHosting,
ModrinthMaven,
Other,
Named(String),
}
impl Serialize for DownloadSource {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
{
match self {
Self::Named(name) => serializer.serialize_str(name),
Self::Website => serializer.serialize_str("website"),
Self::ModrinthApp => serializer.serialize_str("modrinth_app"),
Self::ModrinthHosting => {
serializer.serialize_str("modrinth_hosting")
}
Self::ModrinthMaven => serializer.serialize_str("modrinth_maven"),
Self::Other => serializer.serialize_str("other"),
}
}
}
impl<'de> Deserialize<'de> for DownloadSource {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: Deserializer<'de>,
{
let source = String::deserialize(deserializer)?;
Ok(match source.as_str() {
"website" => Self::Website,
"modrinth_app" => Self::ModrinthApp,
"modrinth_hosting" => Self::ModrinthHosting,
"modrinth_maven" => Self::ModrinthMaven,
"other" => Self::Other,
_ if !source.is_empty() => Self::Named(source),
_ => {
return Err(D::Error::custom(
"download source cannot be empty",
));
}
})
}
}
#[derive(Debug, clickhouse::Row, serde::Deserialize)]
struct DownloadRow {
bucket: u64,
project_id: DBProjectId,
domain: String,
user_agent: String,
version_id: DBVersionId,
monetized: i8,
country: String,
reason: String,
game_version: String,
loader: String,
downloads: u64,
}
const DOWNLOADS: &str = {
const USE_PROJECT_ID: &str = "{use_project_id: Bool}";
const USE_DOMAIN: &str = "{use_domain: Bool}";
const USE_USER_AGENT: &str = "{use_user_agent: Bool}";
const USE_VERSION_ID: &str = "{use_version_id: Bool}";
const USE_MONETIZED: &str = "{use_monetized: Bool}";
const USE_COUNTRY: &str = "{use_country: Bool}";
const USE_REASON: &str = "{use_reason: Bool}";
const USE_GAME_VERSION: &str = "{use_game_version: Bool}";
const USE_LOADER: &str = "{use_loader: Bool}";
const FILTER_DOMAIN: &str = "{filter_domain: Array(String)}";
const FILTER_VERSION_ID: &str = "{filter_version_id: Array(UInt64)}";
const FILTER_MONETIZED: &str = "{filter_monetized: UInt8}";
const FILTER_COUNTRY: &str = "{filter_country: Array(String)}";
const FILTER_REASON: &str = "{filter_reason: Array(String)}";
const FILTER_GAME_VERSION: &str = "{filter_game_version: Array(String)}";
const FILTER_LOADER: &str = "{filter_loader: Array(String)}";
formatcp!(
"SELECT
widthBucket(toUnixTimestamp(recorded), {TIME_RANGE_START}, {TIME_RANGE_END}, {TIME_SLICES}) AS bucket,
if({USE_PROJECT_ID}, project_id, 0) AS project_id,
if({USE_DOMAIN}, domain, '') AS domain,
if({USE_USER_AGENT}, user_agent, '') AS user_agent,
if({USE_VERSION_ID}, version_id, 0) AS version_id,
if({USE_MONETIZED}, CAST(user_id != 0 AS Int8), -1) AS monetized,
if({USE_COUNTRY}, country, '') AS country,
if({USE_REASON}, reason, '') AS reason,
if({USE_GAME_VERSION}, game_version, '') AS game_version,
if({USE_LOADER}, loader, '') AS loader,
COUNT(*) AS downloads
FROM downloads
WHERE
recorded BETWEEN {TIME_RANGE_START} AND {TIME_RANGE_END}
-- make sure that the REAL project id is included,
-- not the possibly-zero one,
-- by using `downloads.project_id` instead of `project_id`
AND downloads.project_id IN {PROJECT_IDS}
AND (empty({FILTER_DOMAIN}) OR downloads.domain IN {FILTER_DOMAIN})
AND (empty({FILTER_VERSION_ID}) OR downloads.version_id IN {FILTER_VERSION_ID})
AND ({FILTER_MONETIZED} = 2 OR CAST(downloads.user_id != 0 AS UInt8) = {FILTER_MONETIZED})
AND (empty({FILTER_COUNTRY}) OR downloads.country IN {FILTER_COUNTRY})
AND (empty({FILTER_REASON}) OR downloads.reason IN {FILTER_REASON})
AND (empty({FILTER_GAME_VERSION}) OR downloads.game_version IN {FILTER_GAME_VERSION})
AND (empty({FILTER_LOADER}) OR downloads.loader IN {FILTER_LOADER})
GROUP BY bucket, project_id, domain, user_agent, version_id, monetized, country, reason, game_version, loader"
)
};
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
struct DownloadBucket {
bucket: u64,
project_id: DBProjectId,
domain: Option<String>,
user_agent: Option<DownloadSource>,
version_id: Option<DBVersionId>,
monetized: Option<bool>,
country: Option<String>,
reason: Option<DownloadReason>,
game_version: Option<String>,
loader: Option<String>,
}
pub(crate) async fn fetch(
cx: &mut QueryClickhouseContext<'_>,
metrics: &Metrics<ProjectDownloadsField, ProjectDownloadsFilters>,
) -> Result<(), ApiError> {
use ProjectDownloadsField as F;
let uses = |field| metrics.bucket_by.contains(&field);
let use_columns = &[
("use_project_id", uses(F::ProjectId)),
("use_domain", uses(F::Domain)),
(
"use_user_agent",
uses(F::UserAgent) || !metrics.filter_by.user_agent.is_empty(),
),
("use_version_id", uses(F::VersionId)),
("use_monetized", uses(F::Monetized)),
("use_country", uses(F::Country)),
("use_reason", uses(F::Reason)),
("use_game_version", uses(F::GameVersion)),
("use_loader", uses(F::Loader)),
];
let mut query = cx
.clickhouse
.query(DOWNLOADS)
.param("time_range_start", cx.req.time_range.start.timestamp())
.param("time_range_end", cx.req.time_range.end.timestamp())
.param("time_slices", cx.time_slices.len())
.param("project_ids", cx.project_ids);
for (param_name, used) in use_columns {
query = query.param(param_name, used)
}
for filter_param in [
ClickhouseFilterParam::String(
"filter_domain",
&metrics.filter_by.domain,
),
ClickhouseFilterParam::VersionId(
"filter_version_id",
&metrics.filter_by.version_id,
),
ClickhouseFilterParam::Bool(
"filter_monetized",
&metrics.filter_by.monetized,
),
ClickhouseFilterParam::String(
"filter_country",
&metrics.filter_by.country,
),
ClickhouseFilterParam::DownloadReason(
"filter_reason",
&metrics.filter_by.reason,
),
ClickhouseFilterParam::String(
"filter_game_version",
&metrics.filter_by.game_version,
),
ClickhouseFilterParam::String(
"filter_loader",
&metrics.filter_by.loader,
),
] {
query = filter_param.bind(query);
}
let uses_column = |name| {
use_columns
.iter()
.any(|(column_name, used)| *column_name == name && *used)
};
let mut cursor = query.fetch::<DownloadRow>()?;
let mut buckets = HashMap::<DownloadBucket, u64>::new();
while let Some(row) = cursor.next().await? {
let normalized_source = normalize_download_source(&row.user_agent);
if !metrics.filter_by.user_agent.is_empty()
&& !normalized_source.as_ref().is_some_and(|source| {
metrics.filter_by.user_agent.contains(source)
})
{
continue;
}
let key = DownloadBucket {
bucket: row.bucket,
project_id: row.project_id,
domain: uses_column("use_domain").then(|| row.domain.clone()),
user_agent: uses(F::UserAgent)
.then_some(normalized_source)
.flatten(),
version_id: uses_column("use_version_id").then_some(row.version_id),
monetized: if uses_column("use_monetized") {
match row.monetized {
0 => Some(false),
1 => Some(true),
_ => None,
}
} else {
None
},
country: uses_column("use_country").then(|| row.country.clone()),
reason: if uses_column("use_reason") {
none_if_empty(row.reason.clone()).and_then(|s| s.parse().ok())
} else {
None
},
game_version: uses_column("use_game_version")
.then(|| row.game_version.clone()),
loader: uses_column("use_loader").then(|| row.loader.clone()),
};
*buckets.entry(key).or_default() += row.downloads;
}
for (key, downloads) in buckets {
add_to_time_slice(
cx.time_slices,
key.bucket as usize,
AnalyticsData::Project(ProjectAnalytics {
source_project: key.project_id.into(),
metrics: ProjectMetrics::Downloads(ProjectDownloads {
domain: key.domain.and_then(none_if_empty),
user_agent: key.user_agent,
version_id: key
.version_id
.and_then(none_if_zero_version_id),
monetized: key.monetized,
country: key
.country
.map(|country| condense_country(country, downloads)),
reason: key.reason,
game_version: key.game_version.and_then(none_if_empty),
loader: key.loader.and_then(none_if_empty),
downloads,
}),
}),
)?;
}
Ok(())
}
#[derive(Debug, Clone, Copy)]
enum DownloadSourcePattern {
Named(&'static str),
Website,
ModrinthApp,
ModrinthHosting,
ModrinthMaven,
}
impl DownloadSourcePattern {
fn into_source(self) -> DownloadSource {
match self {
Self::Named(name) => DownloadSource::Named(name.into()),
Self::Website => DownloadSource::Website,
Self::ModrinthApp => DownloadSource::ModrinthApp,
Self::ModrinthHosting => DownloadSource::ModrinthHosting,
Self::ModrinthMaven => DownloadSource::ModrinthMaven,
}
}
}
static DOWNLOAD_SOURCE_PATTERNS: LazyLock<Vec<(Regex, DownloadSourcePattern)>> =
LazyLock::new(|| {
use DownloadSourcePattern as P;
[
(r"^modrinth/kyros/", P::ModrinthHosting),
(r"^modrinth/theseus/", P::ModrinthApp),
(r"^(Gradle/|Apache-Maven/)", P::ModrinthMaven),
(r"^MultiMC/", P::Named("MultiMC")),
(r"^PrismLauncher/", P::Named("Prism Launcher")),
(r"^PolyMC/", P::Named("PolyMC")),
(r"^FCL/", P::Named("FCL")),
(r"^PCL2/", P::Named("PCL2")),
(r"^HMCL/", P::Named("HMCL")),
(r"^Lunar Client Launcher", P::Named("Lunar Client")),
(r"^PojavLauncher", P::Named("PojavLauncher")),
(r"^ATLauncher/", P::Named("ATLauncher")),
(r"FeatherLauncher/", P::Named("Feather Client")),
(
r"^FeatherMC/Feather Client Rust Launcher/",
P::Named("Feather Client"),
),
(r"Feather/[0-9A-Za-z]+", P::Named("Feather Client")),
(r"^PandoraLauncher/", P::Named("Pandora Launcher")),
(r"^unsup", P::Named("unsup")),
(r"nothub/mrpack-install", P::Named("mrpack-install")),
(r"^(packwiz-installer|packwiz/)", P::Named("Packwiz")),
(
r"^(Mozilla/|Chrome/|Chromium/|Firefox/|Safari/|AppleWebKit/|Edg/|OPR/)",
P::Website,
),
]
.into_iter()
.map(|(pattern, source)| {
(
Regex::new(pattern)
.expect("download source regex should be valid"),
source,
)
})
.collect()
});
const MAX_DOWNLOAD_SOURCE_CACHE_BYTES: usize = 100 * 1024 * 1024;
static DOWNLOAD_SOURCE_CACHE: LazyLock<
DashMap<String, Option<DownloadSource>>,
> = LazyLock::new(DashMap::new);
static DOWNLOAD_SOURCE_CACHE_BYTES: AtomicUsize = AtomicUsize::new(0);
pub(crate) fn normalize_download_source(
user_agent: &str,
) -> Option<DownloadSource> {
if let Some(source) = DOWNLOAD_SOURCE_CACHE.get(user_agent) {
return source.clone();
}
let source = normalize_download_source_uncached(user_agent);
let key_bytes = user_agent.len();
let previous_bytes =
DOWNLOAD_SOURCE_CACHE_BYTES.fetch_add(key_bytes, Ordering::Relaxed);
if previous_bytes + key_bytes <= MAX_DOWNLOAD_SOURCE_CACHE_BYTES {
DOWNLOAD_SOURCE_CACHE.insert(user_agent.to_owned(), source.clone());
} else {
DOWNLOAD_SOURCE_CACHE_BYTES.fetch_sub(key_bytes, Ordering::Relaxed);
}
source
}
fn normalize_download_source_uncached(
user_agent: &str,
) -> Option<DownloadSource> {
DOWNLOAD_SOURCE_PATTERNS.iter().find_map(|(regex, source)| {
regex.is_match(user_agent).then(|| source.into_source())
})
}
@@ -0,0 +1,266 @@
use std::collections::HashMap;
use const_format::formatcp;
use serde::{Deserialize, Serialize};
use crate::{
database::models::{DBProjectId, DBVersionId},
models::ids::VersionId,
routes::ApiError,
};
use super::super::{
ClickhouseFilterParam, QueryClickhouseContext, add_to_time_slice,
condense_country, none_if_empty, none_if_zero_version_id,
};
use super::{AnalyticsData, Metrics, ProjectAnalytics, ProjectMetrics};
const TIME_RANGE_START: &str = "{time_range_start: UInt64}";
const TIME_RANGE_END: &str = "{time_range_end: UInt64}";
const TIME_SLICES: &str = "{time_slices: UInt64}";
const PROJECT_IDS: &str = "{project_ids: Array(UInt64)}";
/// Fields for [`super::ReturnMetrics::project_playtime`].
#[derive(
Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, utoipa::ToSchema,
)]
#[serde(rename_all = "snake_case")]
pub enum ProjectPlaytimeField {
/// Project ID.
ProjectId,
/// Version ID of this project.
VersionId,
/// Game mod loader which was used to count this playtime, e.g. Fabric.
Loader,
/// Game version which this project was played on.
GameVersion,
/// What country this playtime came from.
///
/// To anonymize the data, the country may be reported as `XX`.
Country,
}
/// Filters for [`super::ReturnMetrics::project_playtime`].
#[derive(Debug, Clone, Default, Serialize, Deserialize, utoipa::ToSchema)]
pub struct ProjectPlaytimeFilters {
/// Version IDs to include.
#[serde(default)]
pub version_id: Vec<VersionId>,
/// Loaders to include.
#[serde(default)]
pub loader: Vec<String>,
/// Game versions to include.
#[serde(default)]
pub game_version: Vec<String>,
/// Country codes to include.
#[serde(default)]
pub country: Vec<String>,
}
/// [`super::ReturnMetrics::project_playtime`].
#[derive(Debug, Clone, Default, Serialize, Deserialize, utoipa::ToSchema)]
pub struct ProjectPlaytime {
/// [`ProjectPlaytimeField::VersionId`].
#[serde(skip_serializing_if = "Option::is_none")]
pub(crate) version_id: Option<VersionId>,
/// [`ProjectPlaytimeField::Loader`].
#[serde(skip_serializing_if = "Option::is_none")]
pub(crate) loader: Option<String>,
/// [`ProjectPlaytimeField::GameVersion`].
#[serde(skip_serializing_if = "Option::is_none")]
pub(crate) game_version: Option<String>,
/// [`ProjectPlaytimeField::Country`].
#[serde(skip_serializing_if = "Option::is_none")]
pub(crate) country: Option<String>,
/// Total number of seconds of playtime for this bucket.
pub(crate) seconds: u64,
}
#[derive(Debug, clickhouse::Row, serde::Deserialize)]
struct PlaytimeRow {
bucket: u64,
project_id: DBProjectId,
parent_version_id: DBVersionId,
version_id: DBVersionId,
loader: String,
game_version: String,
country: String,
seconds: u64,
}
const PLAYTIME: &str = {
const USE_PROJECT_ID: &str = "{use_project_id: Bool}";
const USE_VERSION_ID: &str = "{use_version_id: Bool}";
const USE_LOADER: &str = "{use_loader: Bool}";
const USE_GAME_VERSION: &str = "{use_game_version: Bool}";
const USE_COUNTRY: &str = "{use_country: Bool}";
const PARENT_VERSION_IDS: &str = "{parent_version_ids: Array(UInt64)}";
const FILTER_VERSION_ID: &str = "{filter_version_id: Array(UInt64)}";
const FILTER_LOADER: &str = "{filter_loader: Array(String)}";
const FILTER_GAME_VERSION: &str = "{filter_game_version: Array(String)}";
const FILTER_COUNTRY: &str = "{filter_country: Array(String)}";
formatcp!(
"SELECT
bucket,
if({USE_PROJECT_ID}, source_project_id, 0) AS project_id,
parent_version_id,
version_id,
loader,
game_version,
country,
SUM(seconds) AS seconds
FROM (
SELECT
widthBucket(toUnixTimestamp(recorded), {TIME_RANGE_START}, {TIME_RANGE_END}, {TIME_SLICES}) AS bucket,
project_id AS source_project_id,
0 AS parent_version_id,
if({USE_VERSION_ID}, version_id, 0) AS version_id,
if({USE_LOADER}, loader, '') AS loader,
if({USE_GAME_VERSION}, game_version, '') AS game_version,
if({USE_COUNTRY}, country, '') AS country,
seconds
FROM playtime
WHERE
recorded BETWEEN {TIME_RANGE_START} AND {TIME_RANGE_END}
AND playtime.project_id IN {PROJECT_IDS}
AND (empty({FILTER_VERSION_ID}) OR playtime.version_id IN {FILTER_VERSION_ID})
AND (empty({FILTER_LOADER}) OR playtime.loader IN {FILTER_LOADER})
AND (empty({FILTER_GAME_VERSION}) OR playtime.game_version IN {FILTER_GAME_VERSION})
AND (empty({FILTER_COUNTRY}) OR playtime.country IN {FILTER_COUNTRY})
UNION ALL
SELECT
widthBucket(toUnixTimestamp(recorded), {TIME_RANGE_START}, {TIME_RANGE_END}, {TIME_SLICES}) AS bucket,
0 AS source_project_id,
parent AS parent_version_id,
if({USE_VERSION_ID}, version_id, 0) AS version_id,
if({USE_LOADER}, loader, '') AS loader,
if({USE_GAME_VERSION}, game_version, '') AS game_version,
if({USE_COUNTRY}, country, '') AS country,
seconds
FROM playtime
WHERE
recorded BETWEEN {TIME_RANGE_START} AND {TIME_RANGE_END}
AND parent IN {PARENT_VERSION_IDS}
AND (empty({FILTER_VERSION_ID}) OR playtime.version_id IN {FILTER_VERSION_ID})
AND (empty({FILTER_LOADER}) OR playtime.loader IN {FILTER_LOADER})
AND (empty({FILTER_GAME_VERSION}) OR playtime.game_version IN {FILTER_GAME_VERSION})
AND (empty({FILTER_COUNTRY}) OR playtime.country IN {FILTER_COUNTRY})
)
GROUP BY bucket, project_id, parent_version_id, version_id, loader, game_version, country"
)
};
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
struct PlaytimeBucket {
bucket: u64,
project_id: DBProjectId,
version_id: Option<DBVersionId>,
loader: Option<String>,
game_version: Option<String>,
country: Option<String>,
}
pub(crate) async fn fetch(
cx: &mut QueryClickhouseContext<'_>,
parent_version_projects: &HashMap<DBVersionId, DBProjectId>,
metrics: &Metrics<ProjectPlaytimeField, ProjectPlaytimeFilters>,
) -> Result<(), ApiError> {
use ProjectPlaytimeField as F;
let uses = |field| metrics.bucket_by.contains(&field);
let use_columns = &[
("use_project_id", uses(F::ProjectId)),
("use_version_id", uses(F::VersionId)),
("use_loader", uses(F::Loader)),
("use_game_version", uses(F::GameVersion)),
("use_country", uses(F::Country)),
];
let uses_column = |name| {
use_columns
.iter()
.any(|(column_name, used)| *column_name == name && *used)
};
let mut query = cx
.clickhouse
.query(PLAYTIME)
.param("time_range_start", cx.req.time_range.start.timestamp())
.param("time_range_end", cx.req.time_range.end.timestamp())
.param("time_slices", cx.time_slices.len())
.param("project_ids", cx.project_ids)
.param("parent_version_ids", cx.parent_version_ids);
for (param_name, used) in use_columns {
query = query.param(param_name, used)
}
for filter_param in [
ClickhouseFilterParam::VersionId(
"filter_version_id",
&metrics.filter_by.version_id,
),
ClickhouseFilterParam::String(
"filter_loader",
&metrics.filter_by.loader,
),
ClickhouseFilterParam::String(
"filter_game_version",
&metrics.filter_by.game_version,
),
ClickhouseFilterParam::String(
"filter_country",
&metrics.filter_by.country,
),
] {
query = filter_param.bind(query);
}
let mut cursor = query.fetch::<PlaytimeRow>()?;
let mut buckets = HashMap::<PlaytimeBucket, u64>::new();
while let Some(row) = cursor.next().await? {
let project_id =
if uses_column("use_project_id") && row.project_id.0 == 0 {
parent_version_projects
.get(&row.parent_version_id)
.copied()
.unwrap_or(row.project_id)
} else {
row.project_id
};
let key = PlaytimeBucket {
bucket: row.bucket,
project_id,
version_id: uses_column("use_version_id").then_some(row.version_id),
loader: uses_column("use_loader").then(|| row.loader.clone()),
game_version: uses_column("use_game_version")
.then(|| row.game_version.clone()),
country: uses_column("use_country").then(|| row.country.clone()),
};
*buckets.entry(key).or_default() += row.seconds;
}
for (key, seconds) in buckets {
add_to_time_slice(
cx.time_slices,
key.bucket as usize,
AnalyticsData::Project(ProjectAnalytics {
source_project: key.project_id.into(),
metrics: ProjectMetrics::Playtime(ProjectPlaytime {
version_id: key
.version_id
.and_then(none_if_zero_version_id),
loader: key.loader.and_then(none_if_empty),
game_version: key.game_version.and_then(none_if_empty),
country: key
.country
.map(|country| condense_country(country, seconds)),
seconds,
}),
}),
)?;
}
Ok(())
}
@@ -0,0 +1,98 @@
use futures::StreamExt;
use rust_decimal::Decimal;
use serde::{Deserialize, Serialize};
use sqlx::Row;
use crate::{
database::{PgPool, models::DBProjectId},
models::ids::ProjectId,
routes::ApiError,
util::error::Context,
};
use super::super::{TimeSlice, add_to_time_slice};
use super::{AnalyticsData, ProjectAnalytics, ProjectMetrics};
/// Fields for [`super::ReturnMetrics::project_revenue`].
#[derive(
Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, utoipa::ToSchema,
)]
#[serde(rename_all = "snake_case")]
pub enum ProjectRevenueField {
/// Project ID.
ProjectId,
}
/// Filters for [`super::ReturnMetrics::project_revenue`].
#[derive(Debug, Clone, Default, Serialize, Deserialize, utoipa::ToSchema)]
pub struct ProjectRevenueFilters {}
/// [`super::ReturnMetrics::project_revenue`].
#[derive(Debug, Clone, Default, Serialize, Deserialize, utoipa::ToSchema)]
pub struct ProjectRevenue {
/// Total revenue for this bucket.
pub(crate) revenue: Decimal,
}
pub(crate) async fn fetch(
pool: &PgPool,
time_slices: &mut [TimeSlice],
req: &super::super::GetRequest,
num_time_slices: usize,
project_id_values: &[i64],
) -> Result<(), ApiError> {
let mut rows = sqlx::query(
"SELECT
WIDTH_BUCKET(
EXTRACT(EPOCH FROM created)::bigint,
EXTRACT(EPOCH FROM $1::timestamp with time zone AT TIME ZONE 'UTC')::bigint,
EXTRACT(EPOCH FROM $2::timestamp with time zone AT TIME ZONE 'UTC')::bigint,
$3::integer
) AS bucket,
mod_id,
SUM(amount) amount_sum
FROM payouts_values
WHERE
-- only project revenue is counted here
-- for affiliate code revenue, see `affiliate_code_revenue`
payouts_values.mod_id IS NOT NULL
AND payouts_values.mod_id = ANY($4)
AND created BETWEEN $1 AND $2
GROUP BY bucket, mod_id",
)
.bind(req.time_range.start)
.bind(req.time_range.end)
.bind(num_time_slices as i64)
.bind(project_id_values)
.fetch(pool);
while let Some(row) = rows.next().await.transpose()? {
let bucket = row
.try_get::<Option<i32>, _>("bucket")?
.wrap_internal_err("bucket should be non-null - query bug!")?;
let bucket = usize::try_from(bucket).wrap_internal_err_with(|| {
eyre::eyre!(
"bucket value {bucket} does not fit into `usize` - query bug!"
)
})?;
let mod_id = row.try_get::<Option<i64>, _>("mod_id")?;
let amount_sum = row.try_get::<Option<Decimal>, _>("amount_sum")?;
if let Some(source_project) =
mod_id.map(DBProjectId).map(ProjectId::from)
&& let Some(revenue) = amount_sum
{
add_to_time_slice(
time_slices,
bucket,
AnalyticsData::Project(ProjectAnalytics {
source_project,
metrics: ProjectMetrics::Revenue(ProjectRevenue {
revenue,
}),
}),
)?;
}
}
Ok(())
}
@@ -0,0 +1,181 @@
use const_format::formatcp;
use serde::{Deserialize, Serialize};
use crate::{database::models::DBProjectId, routes::ApiError};
use super::super::{
ClickhouseFilterParam, ClickhouseQueryParams, QueryClickhouseContext,
condense_country, none_if_empty, query_clickhouse,
};
use super::{AnalyticsData, Metrics, ProjectAnalytics, ProjectMetrics};
const TIME_RANGE_START: &str = "{time_range_start: UInt64}";
const TIME_RANGE_END: &str = "{time_range_end: UInt64}";
const TIME_SLICES: &str = "{time_slices: UInt64}";
const PROJECT_IDS: &str = "{project_ids: Array(UInt64)}";
/// Fields for [`super::ReturnMetrics::project_views`].
#[derive(
Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, utoipa::ToSchema,
)]
#[serde(rename_all = "snake_case")]
pub enum ProjectViewsField {
/// Project ID.
ProjectId,
/// Referrer domain which linked to this project.
Domain,
/// Modrinth site path which was visited, e.g. `/mod/foo`.
SitePath,
/// Whether these views were monetized or not.
Monetized,
/// What country these views came from.
///
/// To anonymize the data, the country may be reported as `XX`.
Country,
}
/// Filters for [`super::ReturnMetrics::project_views`].
#[derive(Debug, Clone, Default, Serialize, Deserialize, utoipa::ToSchema)]
pub struct ProjectViewsFilters {
/// Referrer domains to include.
#[serde(default)]
pub domain: Vec<String>,
/// Modrinth site paths to include.
#[serde(default)]
pub site_path: Vec<String>,
/// Monetization states to include.
#[serde(default)]
pub monetized: Vec<bool>,
/// Country codes to include.
#[serde(default)]
pub country: Vec<String>,
}
/// [`super::ReturnMetrics::project_views`].
#[derive(Debug, Clone, Default, Serialize, Deserialize, utoipa::ToSchema)]
pub struct ProjectViews {
/// [`ProjectViewsField::Domain`].
#[serde(skip_serializing_if = "Option::is_none")]
pub domain: Option<String>,
/// [`ProjectViewsField::SitePath`].
#[serde(skip_serializing_if = "Option::is_none")]
pub site_path: Option<String>,
/// [`ProjectViewsField::Monetized`].
#[serde(skip_serializing_if = "Option::is_none")]
pub monetized: Option<bool>,
/// [`ProjectViewsField::Country`].
#[serde(skip_serializing_if = "Option::is_none")]
pub country: Option<String>,
/// Total number of views for this bucket.
pub views: u64,
}
#[derive(Debug, clickhouse::Row, serde::Deserialize)]
struct ViewRow {
bucket: u64,
project_id: DBProjectId,
domain: String,
site_path: String,
monetized: i8,
country: String,
views: u64,
}
const VIEWS: &str = {
const USE_PROJECT_ID: &str = "{use_project_id: Bool}";
const USE_DOMAIN: &str = "{use_domain: Bool}";
const USE_SITE_PATH: &str = "{use_site_path: Bool}";
const USE_MONETIZED: &str = "{use_monetized: Bool}";
const USE_COUNTRY: &str = "{use_country: Bool}";
const FILTER_DOMAIN: &str = "{filter_domain: Array(String)}";
const FILTER_SITE_PATH: &str = "{filter_site_path: Array(String)}";
const FILTER_MONETIZED: &str = "{filter_monetized: UInt8}";
const FILTER_COUNTRY: &str = "{filter_country: Array(String)}";
formatcp!(
"SELECT
widthBucket(toUnixTimestamp(recorded), {TIME_RANGE_START}, {TIME_RANGE_END}, {TIME_SLICES}) AS bucket,
if({USE_PROJECT_ID}, project_id, 0) AS project_id,
if({USE_DOMAIN}, domain, '') AS domain,
if({USE_SITE_PATH}, site_path, '') AS site_path,
if({USE_MONETIZED}, CAST(monetized AS Int8), -1) AS monetized,
if({USE_COUNTRY}, country, '') AS country,
COUNT(*) AS views
FROM views
WHERE
recorded BETWEEN {TIME_RANGE_START} AND {TIME_RANGE_END}
-- make sure that the REAL project id is included,
-- not the possibly-zero one,
-- by using `views.project_id` instead of `project_id`
AND views.project_id IN {PROJECT_IDS}
AND (empty({FILTER_DOMAIN}) OR views.domain IN {FILTER_DOMAIN})
AND (empty({FILTER_SITE_PATH}) OR views.site_path IN {FILTER_SITE_PATH})
AND ({FILTER_MONETIZED} = 2 OR CAST(views.monetized AS UInt8) = {FILTER_MONETIZED})
AND (empty({FILTER_COUNTRY}) OR views.country IN {FILTER_COUNTRY})
GROUP BY bucket, project_id, domain, site_path, monetized, country
"
)
};
pub(crate) async fn fetch(
cx: &mut QueryClickhouseContext<'_>,
metrics: &Metrics<ProjectViewsField, ProjectViewsFilters>,
) -> Result<(), ApiError> {
use ProjectViewsField as F;
let uses = |field| metrics.bucket_by.contains(&field);
query_clickhouse::<ViewRow>(
cx,
VIEWS,
ClickhouseQueryParams::PROJECT_IDS,
&[
("use_project_id", uses(F::ProjectId)),
("use_domain", uses(F::Domain)),
("use_site_path", uses(F::SitePath)),
("use_monetized", uses(F::Monetized)),
("use_country", uses(F::Country)),
],
vec![
ClickhouseFilterParam::String(
"filter_domain",
&metrics.filter_by.domain,
),
ClickhouseFilterParam::String(
"filter_site_path",
&metrics.filter_by.site_path,
),
ClickhouseFilterParam::Bool(
"filter_monetized",
&metrics.filter_by.monetized,
),
ClickhouseFilterParam::String(
"filter_country",
&metrics.filter_by.country,
),
],
|_| true,
|row| row.bucket,
|row| {
let country = if uses(F::Country) {
Some(condense_country(row.country, row.views))
} else {
None
};
AnalyticsData::Project(ProjectAnalytics {
source_project: row.project_id.into(),
metrics: ProjectMetrics::Views(ProjectViews {
domain: none_if_empty(row.domain),
site_path: none_if_empty(row.site_path),
monetized: match row.monetized {
0 => Some(false),
1 => Some(true),
_ => None,
},
country,
views: row.views,
}),
})
},
)
.await
}
@@ -0,0 +1,813 @@
//! # Design rationale
//!
//! - different metrics require different scopes
//! - views, downloads, playtime requires `Scopes::ANALYTICS`
//! - revenue requires `Scopes::PAYOUTS_READ`
//! - each request returns an array of N elements; if you have to make multiple
//! requests, you have to zip together M arrays of N elements
//! - this makes it inconvenient to have separate endpoints
mod facets;
mod metrics;
mod old;
use std::{collections::HashMap, num::NonZeroU64};
use crate::database::PgPool;
use actix_web::{HttpRequest, post, web};
use chrono::{DateTime, TimeDelta, Utc};
use eyre::eyre;
use serde::{Deserialize, Serialize};
use crate::{
auth::{
AuthenticationError, checks::filter_visible_version_ids,
get_user_from_headers,
},
database::{
self, DBProject,
models::{
DBAffiliateCode, DBAffiliateCodeId, DBProjectId, DBUser, DBVersion,
DBVersionId,
},
redis::RedisPool,
},
models::{
ids::{AffiliateCodeId, ProjectId, VersionId},
pats::Scopes,
projects::ProjectStatus,
teams::ProjectPermissions,
threads::MessageBody,
v3::analytics::DownloadReason,
},
queue::session::AuthQueue,
routes::ApiError,
};
pub(crate) use metrics::normalize_download_source;
pub use metrics::*;
pub fn config(cfg: &mut utoipa_actix_web::service_config::ServiceConfig) {
cfg.service(fetch_analytics);
cfg.configure(facets::config);
cfg.configure(old::config);
}
// request
/// Requests analytics data, aggregating over all possible analytics sources
/// like projects and affiliate codes, returning the data in a list of time
/// slices.
#[derive(Debug, Serialize, Deserialize, utoipa::ToSchema)]
pub struct GetRequest {
/// What time range to return statistics for.
pub time_range: TimeRange,
/// What analytics metrics to return data for.
#[serde(default)]
pub return_metrics: ReturnMetrics,
/// What project IDs to return data for.
///
/// If this is empty, all of the user's projects will be included.
#[serde(default)]
pub project_ids: Vec<ProjectId>,
}
/// Time range for fetching analytics.
#[derive(Debug, Serialize, Deserialize, utoipa::ToSchema)]
pub struct TimeRange {
/// When to start including data.
pub start: DateTime<Utc>,
/// When to stop including data.
pub end: DateTime<Utc>,
/// Determines how many time slices between the start and end will be
/// included, and how fine-grained those time slices will be.
///
/// This must fall within the bounds of [`MIN_RESOLUTION`] and
/// [`MAX_TIME_SLICES`].
pub resolution: TimeRangeResolution,
}
/// Determines how many time slices between the start and end will be
/// included, and how fine-grained those time slices will be.
#[derive(Debug, Serialize, Deserialize, utoipa::ToSchema)]
#[serde(rename_all = "snake_case")]
pub enum TimeRangeResolution {
/// Use a set number of time slices, with the resolution being determined
/// automatically.
#[schema(value_type = u64)]
Slices(NonZeroU64),
/// Each time slice will be a set number of minutes long, and the number of
/// slices is determined automatically.
#[schema(value_type = u64)]
Minutes(NonZeroU64),
}
/// Minimum width of a [`TimeSlice`], controlled by [`TimeRange::resolution`].
pub const MIN_RESOLUTION: TimeDelta = TimeDelta::minutes(60);
/// Maximum number of [`TimeSlice`]s in a [`GetResponse`], controlled by
/// [`TimeRange::resolution`].
pub const MAX_TIME_SLICES: usize = 1024;
// response
/// Response for a [`GetRequest`].
#[derive(Debug, Default, Serialize, Deserialize, utoipa::ToSchema)]
pub struct GetResponse {
/// List of N [`TimeSlice`]s, where each slice represents an equal
/// time interval of metrics collection. The number of slices is determined
/// by [`GetRequest::time_range`].
pub metrics: Vec<TimeSlice>,
/// List of events associated with projects that were requested.
pub project_events: Vec<ProjectAnalyticsEvent>,
}
/// Single time interval of metrics collection.
#[derive(Debug, Clone, Default, Serialize, Deserialize, utoipa::ToSchema)]
pub struct TimeSlice(pub Vec<AnalyticsData>);
/// Notable update to a project which may reflect in analytics metrics.
#[derive(Debug, Clone, Serialize, Deserialize, utoipa::ToSchema)]
pub struct ProjectAnalyticsEvent {
/// ID of the event's project.
pub project_id: ProjectId,
/// When the event occurred.
pub timestamp: DateTime<Utc>,
#[serde(flatten)]
pub kind: ProjectAnalyticsEventKind,
}
#[derive(Debug, Clone, Serialize, Deserialize, utoipa::ToSchema)]
#[serde(tag = "kind", rename_all = "snake_case")]
pub enum ProjectAnalyticsEventKind {
/// New version of this project was uploaded.
VersionUploaded {
version_id: VersionId,
version_name: String,
version_number: String,
},
/// Project changed status.
StatusChanged {
status_from: ProjectStatus,
status_to: ProjectStatus,
},
}
// logic
/// Fetches analytics data for the authorized user's projects.
#[utoipa::path(
responses((status = OK, body = inline(GetResponse))),
)]
#[post("")]
pub async fn fetch_analytics(
http_req: HttpRequest,
req: web::Json<GetRequest>,
pool: web::Data<PgPool>,
redis: web::Data<RedisPool>,
session_queue: web::Data<AuthQueue>,
clickhouse: web::Data<clickhouse::Client>,
) -> Result<web::Json<GetResponse>, ApiError> {
let (scopes, user) = get_user_from_headers(
&http_req,
&**pool,
&redis,
&session_queue,
Scopes::ANALYTICS,
)
.await?;
let full_time_range = req.time_range.end - req.time_range.start;
if full_time_range < TimeDelta::zero() {
return Err(ApiError::InvalidInput(
"End date must be after start date".into(),
));
}
let (num_time_slices, resolution) = match req.time_range.resolution {
TimeRangeResolution::Slices(slices) => {
let slices = i32::try_from(slices.get()).map_err(|_| {
ApiError::InvalidInput(
"Number of slices must fit into an `i32`".into(),
)
})?;
let resolution = full_time_range / slices;
(slices as usize, resolution)
}
TimeRangeResolution::Minutes(resolution_minutes) => {
let resolution_minutes = i64::try_from(resolution_minutes.get())
.map_err(|_| {
ApiError::InvalidInput(
"Resolution must fit into a `i64`".into(),
)
})?;
let resolution = TimeDelta::try_minutes(resolution_minutes)
.ok_or_else(|| {
ApiError::InvalidInput("Resolution overflow".into())
})?;
let num_slices =
full_time_range.as_seconds_f64() / resolution.as_seconds_f64();
(num_slices as usize, resolution)
}
};
if num_time_slices > MAX_TIME_SLICES {
return Err(ApiError::Request(eyre!(
"Resolution is too fine or range is too large - maximum of {MAX_TIME_SLICES} time slices, was {num_time_slices}"
)));
}
if resolution < MIN_RESOLUTION {
return Err(ApiError::Request(eyre!(
"Resolution must be at least {MIN_RESOLUTION}, was {resolution}",
)));
}
let mut time_slices = vec![TimeSlice::default(); num_time_slices];
let project_ids = {
if req.project_ids.is_empty() {
DBUser::get_projects(user.id.into(), &**pool, &redis).await?
} else {
req.project_ids
.iter()
.map(|id| DBProjectId::from(*id))
.collect::<Vec<_>>()
}
};
let project_ids =
filter_allowed_project_ids(&project_ids, &user, &pool, &redis).await?;
let project_id_values =
project_ids.iter().map(|id| id.0).collect::<Vec<_>>();
let parent_versions = sqlx::query!(
"
SELECT id, mod_id
FROM versions
WHERE mod_id = ANY($1)
",
&project_id_values,
)
.fetch_all(&**pool)
.await?;
let parent_version_ids = parent_versions
.iter()
.map(|version| DBVersionId(version.id))
.collect::<Vec<_>>();
let parent_version_projects = parent_versions
.iter()
.map(|version| (DBVersionId(version.id), DBProjectId(version.mod_id)))
.collect::<HashMap<_, _>>();
let parent_version_data =
DBVersion::get_many(&parent_version_ids, &**pool, &redis).await?;
let visible_version_ids = filter_visible_version_ids(
parent_version_data
.iter()
.map(|version| &version.inner)
.collect(),
&Some(user.clone()),
&pool,
&redis,
)
.await?;
let mut project_events = parent_version_data
.iter()
.filter(|version| {
visible_version_ids.contains(&version.inner.id)
&& version.inner.date_published >= req.time_range.start
&& version.inner.date_published <= req.time_range.end
})
.map(|version| ProjectAnalyticsEvent {
project_id: version.inner.project_id.into(),
timestamp: version.inner.date_published,
kind: ProjectAnalyticsEventKind::VersionUploaded {
version_id: version.inner.id.into(),
version_name: version.inner.name.clone(),
version_number: version.inner.version_number.clone(),
},
})
.collect::<Vec<_>>();
project_events.extend(
fetch_project_status_change_events(
&project_ids,
&req.time_range,
&pool,
)
.await?,
);
project_events.sort_by_key(|event| event.timestamp);
let affiliate_code_ids =
DBAffiliateCode::get_by_affiliate(user.id.into(), &**pool)
.await?
.into_iter()
.map(|code| code.id)
.collect::<Vec<_>>();
let mut query_clickhouse_cx = QueryClickhouseContext {
clickhouse: &clickhouse,
req: &req,
time_slices: &mut time_slices,
project_ids: &project_ids,
parent_version_ids: &parent_version_ids,
affiliate_code_ids: &affiliate_code_ids,
};
if let Some(metrics) = &req.return_metrics.project_views {
metrics::fetch_project_views(&mut query_clickhouse_cx, metrics).await?;
}
if let Some(metrics) = &req.return_metrics.project_downloads {
metrics::fetch_project_downloads(&mut query_clickhouse_cx, metrics)
.await?;
}
if let Some(metrics) = &req.return_metrics.project_playtime {
metrics::fetch_project_playtime(
&mut query_clickhouse_cx,
&parent_version_projects,
metrics,
)
.await?;
}
if let Some(metrics) = &req.return_metrics.affiliate_code_clicks {
metrics::fetch_affiliate_code_clicks(&mut query_clickhouse_cx, metrics)
.await?;
}
if req.return_metrics.project_revenue.is_some() {
if !scopes.contains(Scopes::PAYOUTS_READ) {
return Err(AuthenticationError::InvalidCredentials.into());
}
metrics::fetch_project_revenue(
&pool,
&mut time_slices,
&req,
num_time_slices,
&project_id_values,
)
.await?;
}
if let Some(metrics) = &req.return_metrics.affiliate_code_conversions {
metrics::fetch_affiliate_code_conversions(
&pool,
&mut time_slices,
&req,
user.id.into(),
num_time_slices,
metrics,
)
.await?;
}
if let Some(metrics) = &req.return_metrics.affiliate_code_revenue {
if !scopes.contains(Scopes::PAYOUTS_READ) {
return Err(AuthenticationError::InvalidCredentials.into());
}
metrics::fetch_affiliate_code_revenue(
&pool,
&mut time_slices,
&req,
user.id.into(),
num_time_slices,
metrics,
)
.await?;
}
Ok(web::Json(GetResponse {
metrics: time_slices,
project_events,
}))
}
pub(crate) fn none_if_empty(s: String) -> Option<String> {
if s.is_empty() { None } else { Some(s) }
}
pub(crate) fn none_if_zero_version_id(v: DBVersionId) -> Option<VersionId> {
if v.0 == 0 { None } else { Some(v.into()) }
}
pub(crate) fn condense_country(country: String, count: u64) -> String {
// Every country under '50' (view or downloads) should be condensed into 'XX'
if count < 50 {
"XX".to_string()
} else {
country
}
}
async fn fetch_project_status_change_events(
project_ids: &[DBProjectId],
time_range: &TimeRange,
pool: &PgPool,
) -> Result<Vec<ProjectAnalyticsEvent>, ApiError> {
let project_id_values =
project_ids.iter().map(|id| id.0).collect::<Vec<_>>();
let rows = sqlx::query!(
r#"
SELECT
t.mod_id AS "project_id!",
tm.created,
tm.body AS "body: sqlx::types::Json<MessageBody>"
FROM threads_messages tm
INNER JOIN threads t ON t.id = tm.thread_id
WHERE
t.mod_id = ANY($1)
AND tm.body->>'type' = 'status_change'
AND tm.created BETWEEN $2 AND $3
"#,
&project_id_values,
time_range.start,
time_range.end,
)
.fetch_all(&**pool)
.await?;
Ok(rows
.into_iter()
.filter_map(|row| {
let MessageBody::StatusChange {
old_status,
new_status,
} = row.body.0
else {
return None;
};
Some(ProjectAnalyticsEvent {
project_id: DBProjectId(row.project_id).into(),
timestamp: row.created,
kind: ProjectAnalyticsEventKind::StatusChanged {
status_from: old_status,
status_to: new_status,
},
})
})
.collect())
}
pub(crate) struct QueryClickhouseContext<'a> {
pub(crate) clickhouse: &'a clickhouse::Client,
pub(crate) req: &'a GetRequest,
pub(crate) time_slices: &'a mut [TimeSlice],
pub(crate) project_ids: &'a [DBProjectId],
pub(crate) parent_version_ids: &'a [DBVersionId],
pub(crate) affiliate_code_ids: &'a [DBAffiliateCodeId],
}
#[derive(Debug, Clone, Copy, Default)]
pub(crate) struct ClickhouseQueryParams {
pub(crate) project_ids: bool,
pub(crate) parent_version_ids: bool,
pub(crate) affiliate_code_ids: bool,
}
pub(crate) enum ClickhouseFilterParam<'a> {
String(&'static str, &'a [String]),
Bool(&'static str, &'a [bool]),
VersionId(&'static str, &'a [VersionId]),
AffiliateCodeId(&'static str, &'a [AffiliateCodeId]),
DownloadReason(&'static str, &'a [DownloadReason]),
}
impl ClickhouseFilterParam<'_> {
pub(crate) fn bind(
self,
query: clickhouse::query::Query,
) -> clickhouse::query::Query {
match self {
Self::String(name, values) => query.param(name, values),
Self::Bool(name, values) => {
let value = match values {
[false] => 0,
[true] => 1,
_ => 2,
};
query.param(name, value)
}
Self::VersionId(name, values) => {
let values = values
.iter()
.map(|id| DBVersionId::from(*id))
.collect::<Vec<_>>();
query.param(name, values)
}
Self::AffiliateCodeId(name, values) => {
let values = values
.iter()
.map(|id| DBAffiliateCodeId::from(*id))
.collect::<Vec<_>>();
query.param(name, values)
}
Self::DownloadReason(name, values) => {
let values =
values.iter().map(ToString::to_string).collect::<Vec<_>>();
query.param(name, values)
}
}
}
}
impl ClickhouseQueryParams {
pub(crate) const PROJECT_IDS: Self = Self {
project_ids: true,
parent_version_ids: false,
affiliate_code_ids: false,
};
pub(crate) const fn empty() -> Self {
Self {
project_ids: false,
parent_version_ids: false,
affiliate_code_ids: false,
}
}
}
impl std::ops::BitOr for ClickhouseQueryParams {
type Output = Self;
fn bitor(self, rhs: Self) -> Self::Output {
Self {
project_ids: self.project_ids || rhs.project_ids,
parent_version_ids: self.parent_version_ids
|| rhs.parent_version_ids,
affiliate_code_ids: self.affiliate_code_ids
|| rhs.affiliate_code_ids,
}
}
}
pub(crate) async fn query_clickhouse<Row>(
cx: &mut QueryClickhouseContext<'_>,
query: &str,
params: ClickhouseQueryParams,
use_columns: &[(&str, bool)],
filter_params: Vec<ClickhouseFilterParam<'_>>,
row_filter: impl Fn(&Row::Value<'_>) -> bool,
// I hate using the hidden type Row::Value here, but it's what next() returns, so I see no other option
row_get_bucket: impl Fn(&Row::Value<'_>) -> u64,
row_to_analytics: impl Fn(Row::Value<'_>) -> AnalyticsData,
) -> Result<(), ApiError>
where
Row: clickhouse::RowRead + serde::de::DeserializeOwned + std::fmt::Debug,
{
let mut query = cx
.clickhouse
.query(query)
.param("time_range_start", cx.req.time_range.start.timestamp())
.param("time_range_end", cx.req.time_range.end.timestamp())
.param("time_slices", cx.time_slices.len());
if params.project_ids {
query = query.param("project_ids", cx.project_ids);
}
if params.parent_version_ids {
query = query.param("parent_version_ids", cx.parent_version_ids);
}
if params.affiliate_code_ids {
query = query.param("affiliate_code_ids", cx.affiliate_code_ids);
}
for (param_name, used) in use_columns {
query = query.param(param_name, used)
}
for filter_param in filter_params {
query = filter_param.bind(query);
}
let mut cursor = query.fetch::<Row>()?;
while let Some(row) = cursor.next().await? {
if !row_filter(&row) {
continue;
}
let bucket = row_get_bucket(&row) as usize;
add_to_time_slice(cx.time_slices, bucket, row_to_analytics(row))?;
}
Ok(())
}
pub(crate) fn add_to_time_slice(
time_slices: &mut [TimeSlice],
bucket: usize,
data: AnalyticsData,
) -> Result<(), ApiError> {
// row.recorded < time_range_start => bucket = 0
// row.recorded >= time_range_end => bucket = num_time_slices
// (note: this is out of range of `time_slices`!)
let Some(bucket) = bucket.checked_sub(1) else {
return Ok(());
};
let num_time_slices = time_slices.len();
let slice = time_slices.get_mut(bucket).ok_or_else(|| {
ApiError::InvalidInput(
format!("bucket {bucket} returned by query out of range for {num_time_slices} - query bug!")
)
})?;
slice.0.push(data);
Ok(())
}
async fn filter_allowed_project_ids(
project_ids: &[DBProjectId],
user: &crate::models::users::User,
pool: &PgPool,
redis: &RedisPool,
) -> Result<Vec<DBProjectId>, ApiError> {
let projects = DBProject::get_many_ids(project_ids, pool, redis).await?;
let team_ids = projects
.iter()
.map(|x| x.inner.team_id)
.collect::<Vec<database::models::DBTeamId>>();
let team_members = database::models::DBTeamMember::get_from_team_full_many(
&team_ids, pool, redis,
)
.await?;
let organization_ids = projects
.iter()
.filter_map(|x| x.inner.organization_id)
.collect::<Vec<database::models::DBOrganizationId>>();
let organizations = database::models::DBOrganization::get_many_ids(
&organization_ids,
pool,
redis,
)
.await?;
let organization_team_ids = organizations
.iter()
.map(|x| x.team_id)
.collect::<Vec<database::models::DBTeamId>>();
let organization_team_members =
database::models::DBTeamMember::get_from_team_full_many(
&organization_team_ids,
pool,
redis,
)
.await?;
Ok(projects
.into_iter()
.filter(|project| {
let team_member = team_members.iter().find(|x| {
x.team_id == project.inner.team_id
&& x.user_id == user.id.into()
});
let organization = project
.inner
.organization_id
.and_then(|oid| organizations.iter().find(|x| x.id == oid));
let organization_team_member =
if let Some(organization) = organization {
organization_team_members.iter().find(|x| {
x.team_id == organization.team_id
&& x.user_id == user.id.into()
})
} else {
None
};
let permissions = ProjectPermissions::get_permissions_by_role(
&user.role,
&team_member.cloned(),
&organization_team_member.cloned(),
)
.unwrap_or_default();
permissions.contains(ProjectPermissions::VIEW_ANALYTICS)
})
.map(|project| project.inner.id)
.collect::<Vec<_>>())
}
#[cfg(test)]
mod tests {
use rust_decimal::Decimal;
use serde_json::json;
use super::*;
#[test]
fn normalizes_download_sources() {
let cases = [
("MultiMC/5.0", Some(DownloadSource::Named("MultiMC".into()))),
(
"PrismLauncher/6.1",
Some(DownloadSource::Named("Prism Launcher".into())),
),
(
"modrinth/theseus/0.8.6 (support@modrinth.com)",
Some(DownloadSource::ModrinthApp),
),
(
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15",
Some(DownloadSource::Website),
),
("curl/8.7.1", None),
];
for (user_agent, source) in cases {
assert_eq!(normalize_download_source(user_agent), source);
}
}
#[test]
fn download_source_serializes_as_raw_string() {
assert_eq!(
serde_json::to_value(DownloadSource::Named("MultiMC".into()))
.unwrap(),
json!("MultiMC")
);
assert_eq!(
serde_json::to_value(DownloadSource::Website).unwrap(),
json!("website")
);
assert_eq!(
serde_json::to_value(DownloadSource::ModrinthApp).unwrap(),
json!("modrinth_app")
);
assert_eq!(
serde_json::to_value(DownloadSource::Other).unwrap(),
json!("other")
);
}
#[test]
fn response_format() {
let test_project_1 = ProjectId(123);
let test_project_2 = ProjectId(456);
let test_project_3 = ProjectId(789);
let src = GetResponse {
metrics: vec![
TimeSlice(vec![
AnalyticsData::Project(ProjectAnalytics {
source_project: test_project_1,
metrics: ProjectMetrics::Views(ProjectViews {
domain: Some("youtube.com".into()),
views: 100,
..Default::default()
}),
}),
AnalyticsData::Project(ProjectAnalytics {
source_project: test_project_2,
metrics: ProjectMetrics::Downloads(ProjectDownloads {
domain: Some("discord.com".into()),
downloads: 150,
..Default::default()
}),
}),
]),
TimeSlice(vec![AnalyticsData::Project(ProjectAnalytics {
source_project: test_project_3,
metrics: ProjectMetrics::Revenue(ProjectRevenue {
revenue: Decimal::new(20000, 2),
}),
})]),
],
project_events: vec![],
};
let target = json!({
"metrics": [
[
{
"source_project": test_project_1.to_string(),
"metric_kind": "views",
"domain": "youtube.com",
"views": 100,
},
{
"source_project": test_project_2.to_string(),
"metric_kind": "downloads",
"domain": "discord.com",
"downloads": 150,
}
],
[
{
"source_project": test_project_3.to_string(),
"metric_kind": "revenue",
"revenue": "200.00",
}
]
],
"project_events": []
});
assert_eq!(serde_json::to_value(src).unwrap(), target);
}
}
+132 -2
View File
@@ -1,4 +1,7 @@
use std::{collections::HashMap, sync::Arc};
use std::{
collections::{HashMap, HashSet},
sync::Arc,
};
use super::{ApiError, oauth_clients::get_user_clients};
use crate::database::PgPool;
@@ -10,12 +13,14 @@ use crate::{
get_user_from_headers,
},
database::{
models::{DBModerationNote, DBUser},
models::{DBModerationNote, DBOrganization, DBProjectId, DBUser},
redis::RedisPool,
},
file_hosting::{FileHost, FileHostPublicity},
models::{
ids::OrganizationId,
notifications::Notification,
organizations::Organization,
pats::Scopes,
projects::Project,
users::{Badges, Role},
@@ -35,6 +40,7 @@ pub fn config(cfg: &mut web::ServiceConfig) {
cfg.route("user", web::get().to(user_auth_get));
cfg.route("users", web::get().to(users_get));
cfg.route("user_email", web::get().to(admin_user_email));
cfg.route("all-projects", web::get().to(all_projects));
cfg.service(
web::scope("user")
@@ -53,11 +59,135 @@ pub fn config(cfg: &mut web::ServiceConfig) {
);
}
#[derive(Serialize)]
pub struct AllProjectsResponse {
pub projects: Vec<Project>,
pub organizations: HashMap<OrganizationId, Organization>,
}
#[derive(Deserialize)]
pub struct UserEmailQuery {
pub email: String,
}
pub async fn all_projects(
req: HttpRequest,
pool: web::Data<PgPool>,
redis: web::Data<RedisPool>,
session_queue: web::Data<AuthQueue>,
) -> Result<web::Json<AllProjectsResponse>, ApiError> {
let user = get_user_from_headers(
&req,
&**pool,
&redis,
&session_queue,
Scopes::PROJECT_READ | Scopes::ORGANIZATION_READ,
)
.await?
.1;
let user_project_ids =
DBUser::get_projects(user.id.into(), &**pool, &redis).await?;
let organization_ids =
DBUser::get_organizations(user.id.into(), &**pool).await?;
let organizations_data =
DBOrganization::get_many_ids(&organization_ids, &**pool, &redis)
.await?;
let team_ids = organizations_data
.iter()
.map(|organization| organization.team_id)
.collect::<Vec<_>>();
let teams_data =
crate::database::models::DBTeamMember::get_from_team_full_many(
&team_ids, &**pool, &redis,
)
.await?;
let users = DBUser::get_many_ids(
&teams_data
.iter()
.map(|member| member.user_id)
.collect::<Vec<_>>(),
&**pool,
&redis,
)
.await?;
let mut team_groups = HashMap::new();
for member in teams_data {
team_groups
.entry(member.team_id)
.or_insert(vec![])
.push(member);
}
let mut organizations = HashMap::new();
let mut visible_organization_ids = Vec::new();
for data in organizations_data {
if !is_visible_organization(&data, &Some(user.clone()), &pool, &redis)
.await?
{
continue;
}
visible_organization_ids.push(data.id);
let members_data = team_groups.remove(&data.team_id).unwrap_or(vec![]);
let team_members = members_data
.into_iter()
.filter_map(|data| {
users.iter().find(|x| x.id == data.user_id).map(|member| {
crate::models::teams::TeamMember::from(
data,
member.clone(),
false,
)
})
})
.collect();
organizations.insert(
OrganizationId::from(data.id),
Organization::from(data, team_members),
);
}
let organization_id_values = visible_organization_ids
.iter()
.map(|id| id.0)
.collect::<Vec<_>>();
let organization_project_ids = sqlx::query!(
"
SELECT m.id
FROM mods m
WHERE m.organization_id = ANY($1)
",
&organization_id_values,
)
.fetch_all(&**pool)
.await?
.into_iter()
.map(|row| DBProjectId(row.id))
.collect::<Vec<_>>();
let project_ids = user_project_ids
.into_iter()
.chain(organization_project_ids)
.collect::<HashSet<_>>()
.into_iter()
.collect::<Vec<_>>();
let projects_data =
crate::database::DBProject::get_many_ids(&project_ids, &**pool, &redis)
.await?;
let projects =
filter_visible_projects(projects_data, &Some(user), &pool, true)
.await?;
Ok(web::Json(AllProjectsResponse {
projects,
organizations,
}))
}
pub async fn admin_user_email(
req: HttpRequest,
pool: web::Data<PgPool>,
+21 -4
View File
@@ -181,12 +181,29 @@ pub async fn test_jre(
Ok(version == major_version)
}
// Gets maximum memory in KiB.
pub async fn get_max_memory() -> crate::Result<u64> {
Ok(sysinfo::System::new_with_specifics(
fn system_memory_bytes() -> u64 {
sysinfo::System::new_with_specifics(
RefreshKind::nothing()
.with_memory(MemoryRefreshKind::nothing().with_ram()),
)
.total_memory()
/ 1024)
}
/// Recommended default max heap (MiB) for new instances based on system RAM.
pub fn default_memory_max_mb() -> u32 {
const BYTES_PER_GIB: u64 = 1024 * 1024 * 1024;
let system_gib = system_memory_bytes() / BYTES_PER_GIB;
if system_gib < 8 {
1024 * 2
} else if system_gib >= 24 {
1024 * 6
} else {
1024 * 4
}
}
// Gets maximum memory in KiB.
pub async fn get_max_memory() -> crate::Result<u64> {
Ok(system_memory_bytes() / 1024)
}
+160 -33
View File
@@ -1,4 +1,5 @@
use std::io::{Read, SeekFrom};
use std::fmt::Write as _;
use std::io::{BufRead, SeekFrom};
use std::time::SystemTime;
use futures::TryFutureExt;
@@ -28,6 +29,8 @@ pub enum LogType {
CrashReport,
}
const LOG_COMPACTION_THRESHOLD: usize = 20;
#[derive(Serialize, Debug)]
pub struct LatestLogCursor {
pub cursor: u64,
@@ -68,6 +71,142 @@ impl CensoredString {
}
}
#[derive(Clone, Copy, Debug, Default)]
struct LogCompactionStats {
compacted_runs: usize,
compacted_lines: usize,
}
struct CompactedLog {
output: String,
stats: LogCompactionStats,
}
fn split_line_ending(line: &str) -> (&str, &str) {
if let Some(line) = line.strip_suffix("\r\n") {
(line, "\r\n")
} else if let Some(line) = line.strip_suffix('\n') {
(line, "\n")
} else if let Some(line) = line.strip_suffix('\r') {
(line, "\r")
} else {
(line, "")
}
}
fn push_compacted_log_run(
output: &mut String,
stats: &mut LogCompactionStats,
line: &str,
line_ending: &str,
count: usize,
) {
if count >= LOG_COMPACTION_THRESHOLD {
output.push_str(line);
let _ = write!(output, " (x{count} times - compacted by Modrinth App)");
output.push_str(line_ending);
stats.compacted_runs += 1;
stats.compacted_lines += count;
} else {
for _ in 0..count {
output.push_str(line);
output.push_str(line_ending);
}
}
}
fn read_compacted_log<R: BufRead>(
reader: &mut R,
) -> std::io::Result<CompactedLog> {
let mut output = String::new();
let mut stats = LogCompactionStats::default();
let mut buffer = Vec::new();
let mut current_line: Option<String> = None;
let mut current_line_ending = String::new();
let mut current_count = 0usize;
loop {
buffer.clear();
let bytes_read = reader.read_until(b'\n', &mut buffer)?;
if bytes_read == 0 {
break;
}
let line = String::from_utf8_lossy(&buffer);
let (line, line_ending) = split_line_ending(&line);
match current_line.as_deref() {
Some(current) if current == line => {
current_count += 1;
if current_line_ending.is_empty() && !line_ending.is_empty() {
current_line_ending = line_ending.to_string();
}
}
_ => {
if let Some(current) = current_line.take() {
push_compacted_log_run(
&mut output,
&mut stats,
&current,
&current_line_ending,
current_count,
);
}
current_line = Some(line.to_string());
current_line_ending = line_ending.to_string();
current_count = 1;
}
}
}
if let Some(current) = current_line {
push_compacted_log_run(
&mut output,
&mut stats,
&current,
&current_line_ending,
current_count,
);
}
Ok(CompactedLog { output, stats })
}
fn compact_duplicate_lines(input: &str) -> CompactedLog {
let mut reader = std::io::Cursor::new(input.as_bytes());
read_compacted_log(&mut reader)
.expect("compacting an in-memory log should not fail")
}
fn format_count(count: usize) -> String {
let raw = count.to_string();
let mut formatted = String::with_capacity(raw.len() + raw.len() / 3);
for (index, character) in raw.chars().enumerate() {
if index > 0 && (raw.len() - index).is_multiple_of(3) {
formatted.push(',');
}
formatted.push(character);
}
formatted
}
async fn maybe_emit_log_compaction_warning(
file_name: &str,
stats: LogCompactionStats,
) {
if stats.compacted_runs == 0 {
return;
}
let _ = crate::event::emit::emit_warning(&format!(
"Modrinth App has compacted {} repeated log lines in {} before displaying it for performance reasons.",
format_count(stats.compacted_lines),
file_name,
))
.await;
}
impl Logs {
async fn build(
log_type: LogType,
@@ -218,41 +357,25 @@ pub async fn get_output_by_filename(
.map(|x| x.1)
.collect::<Vec<_>>();
// Load .gz file into String
if let Some(ext) = path.extension() {
if ext == "gz" {
let file = std::fs::File::open(&path)
.map_err(|e| IOError::with_path(e, &path))?;
let mut contents = [0; 1024];
let mut result = String::new();
let mut gz =
let gz =
flate2::read::GzDecoder::new(std::io::BufReader::new(file));
while gz
.read(&mut contents)
.map_err(|e| IOError::with_path(e, &path))?
> 0
{
result.push_str(&String::from_utf8_lossy(&contents));
contents = [0; 1024];
}
return Ok(CensoredString::censor(result, &credentials));
} else if ext == "log" || ext == "txt" {
let mut result = String::new();
let mut contents = [0; 1024];
let mut file = std::fs::File::open(&path)
let mut reader = std::io::BufReader::new(gz);
let compacted = read_compacted_log(&mut reader)
.map_err(|e| IOError::with_path(e, &path))?;
// iteratively read the file to a String
while file
.read(&mut contents)
.map_err(|e| IOError::with_path(e, &path))?
> 0
{
result.push_str(&String::from_utf8_lossy(&contents));
contents = [0; 1024];
}
let result = CensoredString::censor(result, &credentials);
return Ok(result);
maybe_emit_log_compaction_warning(file_name, compacted.stats).await;
return Ok(CensoredString::censor(compacted.output, &credentials));
} else if ext == "log" || ext == "txt" {
let file = std::fs::File::open(&path)
.map_err(|e| IOError::with_path(e, &path))?;
let mut reader = std::io::BufReader::new(file);
let compacted = read_compacted_log(&mut reader)
.map_err(|e| IOError::with_path(e, &path))?;
maybe_emit_log_compaction_warning(file_name, compacted.stats).await;
return Ok(CensoredString::censor(compacted.output, &credentials));
}
}
Err(crate::ErrorKind::OtherError(format!(
@@ -306,13 +429,15 @@ pub async fn get_live_log_buffer(
let state = State::get().await?;
let lines = crate::state::get_log_buffer(profile_path);
let joined = lines.join("\n");
let compacted = compact_duplicate_lines(&joined);
let credentials = Credentials::get_all(&state.pool)
.await?
.into_iter()
.map(|x| x.1)
.collect::<Vec<_>>();
Ok(CensoredString::censor(joined, &credentials))
maybe_emit_log_compaction_warning("live log", compacted.stats).await;
Ok(CensoredString::censor(compacted.output, &credentials))
}
pub fn clear_live_log_buffer(profile_path: &str) {
@@ -369,7 +494,8 @@ pub async fn get_generic_live_log_cursor(
.read_to_end(&mut buffer)
.map_err(|e| IOError::with_path(e, &path))
.await?; // Read to end of file
let output = String::from_utf8_lossy(&buffer).to_string(); // Convert to String
let output = String::from_utf8_lossy(&buffer); // Convert to String
let compacted = compact_duplicate_lines(&output);
let cursor = cursor + bytes_read as u64; // Update cursor
let credentials = Credentials::get_all(&state.pool)
@@ -377,7 +503,8 @@ pub async fn get_generic_live_log_cursor(
.into_iter()
.map(|x| x.1)
.collect::<Vec<_>>();
let output = CensoredString::censor(output, &credentials);
maybe_emit_log_compaction_warning(log_file_name, compacted.stats).await;
let output = CensoredString::censor(compacted.output, &credentials);
Ok(LatestLogCursor {
cursor,
new_file,
+11 -1
View File
@@ -64,7 +64,7 @@ pub enum FeatureFlag {
}
impl Settings {
const CURRENT_VERSION: usize = 2;
const CURRENT_VERSION: usize = 3;
pub async fn get(
exec: impl sqlx::Executor<'_, Database = sqlx::Sqlite>,
@@ -295,6 +295,16 @@ impl Settings {
self.version = 2;
}
2 => {
// Update old default memory setting from 2GB to 4GB (depending on system memory)
const LEGACY_DEFAULT_MEMORY_MB: u32 = 2048;
if self.memory.maximum == LEGACY_DEFAULT_MEMORY_MB {
self.memory.maximum =
crate::api::jre::default_memory_max_mb();
}
self.version = 3;
}
version => {
return Err(crate::ErrorKind::OtherError(format!(
"Invalid settings version: {version}"
+46
View File
@@ -10,6 +10,52 @@ export type VersionEntry = {
}
const VERSIONS: VersionEntry[] = [
{
date: `2026-05-24T17:46:23+00:00`,
product: 'web',
body: `## Changed
- Updated translations.
## Fixed
- Fixed occasional error when loading version pages.`,
},
{
date: `2026-05-24T17:46:23+00:00`,
product: 'app',
version: '0.13.24',
body: `## Changed
- Updated translations.`,
},
{
date: `2026-05-24T16:26:23+00:00`,
product: 'app',
version: '0.13.23',
body: `## Fixed
- Fixed the discover page not working when the spanish language is selected.`,
},
{
date: `2026-05-24T16:26:23+00:00`,
product: 'web',
body: `## Fixed
- Fixed the discover page not working when the spanish language is selected.`,
},
{
date: `2026-05-24T05:00:37+00:00`,
product: 'app',
version: '0.13.22',
body: `## Added
- Added log spam detection and line compacting logic to prevent Modrinth App from crashing when viewing large log files.
## Changed
- Increased the default memory for instances from 2GB to 4GB (depending on your system memory).
- Improved "Java installation" settings page design. Thanks [@creeperkatze](https://github.com/creeperkatze)`,
},
{
date: `2026-05-24T05:00:37+00:00`,
product: 'web',
body: `## Fixed
- Fixed an issue where the page fails to load sometimes, requiring you to delete your cookies.`,
},
{
date: `2026-05-21T22:13:35+00:00`,
product: 'web',
@@ -102,7 +102,7 @@
"defaultMessage": "No use acortadores de enlaces"
},
"nags.long-headers.description": {
"defaultMessage": "{count, plural, one {# encabezado} other {# encabezados}} en tu descripción {count, plural, one {es} other {son}} demasiado largo(s). Los encabezados deben ser concisos y actuar como títulos de sección, no como frases completas."
"defaultMessage": "{count, plural, one {# encabezado} other {# encabezados}} en tu descripción {count, plural, one {es} other {son}} demasiado {count, plural, one {largo} other {largos}}. Los encabezados deben ser concisos y actuar como títulos de sección, no como frases completas."
},
"nags.long-headers.title": {
"defaultMessage": "Acortar encabezados"
@@ -225,7 +225,7 @@
"defaultMessage": "Selecciona etiquetas adecuadas"
},
"nags.upload-gallery-image.description": {
"defaultMessage": ""
"defaultMessage": "Se requiere al menos una imagen en la galería para mostrar el contenido de tu {type, select, resourcepack {paquete de recursos, excepto para paquetes de audio o de traducción. Si esto describe tu paquete, selecciona la etiqueta correspondiente} shader {shader} other {proyecto}}."
},
"nags.upload-gallery-image.title": {
"defaultMessage": "Subir una imagen a la galería"
@@ -11,6 +11,9 @@
"nags.add-icon.title": {
"defaultMessage": "Lisää kuvake"
},
"nags.add-java-address.description": {
"defaultMessage": "Lisää IP osoite ja portti jota Java Edition pelaajat voivat käyttää liittyäksesi sinun palvelimelle."
},
"nags.add-java-address.title": {
"defaultMessage": "Lisää Java-osoite"
},
@@ -47,9 +50,21 @@
"nags.edit-title.title": {
"defaultMessage": "Muokkaa nimeä"
},
"nags.feature-gallery-image.title": {
"defaultMessage": "Esittele galleria kuvaa"
},
"nags.gallery.title": {
"defaultMessage": "Käy galleria sivulla"
},
"nags.gpl-license-source-required.title": {
"defaultMessage": "Anna lähdekoodi"
},
"nags.identical-links.title": {
"defaultMessage": "Identtiset Linkit"
},
"nags.image-heavy-description.title": {
"defaultMessage": "Varmista esteettömyys"
},
"nags.invalid-license-url.description.default": {
"defaultMessage": "Lisenssin URL-osoite on virheellinen."
},
@@ -66,7 +66,7 @@
"defaultMessage": "Látogasd meg a Képek fület"
},
"nags.gpl-license-source-required.description": {
"defaultMessage": "A {type, select, mod {mod} plugin {bővítmény} other {projekt}} licensze megköveteli, hogy a forráskód elérhető legyen. Kérünk, minden további verzióhoz adj meg forráskód linket vagy forrásfájlt, vagy fontold meg egy másik licensz használatát."
"defaultMessage": "A {type, select, mod {mod} plugin {bővítmény} other {projekt}} licensze megköveteli, hogy a forráskód elérhető legyen. Kérlek, minden további verzióhoz adj meg forráskód linket vagy forrásfájlt, vagy fontold meg egy másik licensz használatát."
},
"nags.gpl-license-source-required.title": {
"defaultMessage": "Adj meg egy forráskódot"
@@ -96,7 +96,7 @@
"defaultMessage": "Adj meg egy érvényes licenszlinket"
},
"nags.link-shortener-usage.description": {
"defaultMessage": "Tilos linkrövidítők vagy más módszerek használata a külső linkek vagy licenszkapcsolatok céljának elrejtésére. Kérünk, csak megfelelő, teljes hosszúságú linkeket használj."
"defaultMessage": "Tilos linkrövidítők vagy más módszerek használata a külső linkek vagy licenszkapcsolatok céljának elrejtésére. Kérlek csak megfelelő, teljes hosszúságú linkeket használj."
},
"nags.link-shortener-usage.title": {
"defaultMessage": "Ne használj linkrövidítőket"
@@ -120,7 +120,7 @@
"defaultMessage": "Adj hozzá helyettesítő szöveget"
},
"nags.misused-discord-link-description": {
"defaultMessage": "A Discord meghívók más típusú linkekhez nem használhatók. Kérünk, a Discord linkedet csak a Discord meghívó link mezőbe írd be."
"defaultMessage": "A Discord meghívók más típusú linkekhez nem használhatók. Kérlek a Discord linkedet csak a Discord meghívó link mezőbe írd be."
},
"nags.misused-discord-link.title": {
"defaultMessage": "Discord meghívó áthelyezése"
@@ -225,7 +225,7 @@
"defaultMessage": "Válaszd ki a pontos címkéket"
},
"nags.upload-gallery-image.description": {
"defaultMessage": "Legalább egy kép szükséges a {type, select, resourcepack {forráscsomagod tartalmának bemutatásához, kivéve a hang- és helyi csomagokat. Ha ez jellemzi a csomagodat, kérünk válaszd ki a megfelelő címkét} shader {shadered tartalmának bemutatásához.} other {projekted tartalmának bemutatásához}}."
"defaultMessage": "Legalább egy kép szükséges a {type, select, resourcepack {forráscsomagod tartalmának bemutatásához, kivéve a hang- és helyi csomagokat. Ha ez jellemzi a csomagodat, kérlek válaszd ki a megfelelő címkét} shader {shadered tartalmának bemutatásához.} other {projekted tartalmának bemutatásához}}."
},
"nags.upload-gallery-image.title": {
"defaultMessage": "Tölts fel egy képet"
@@ -201,7 +201,7 @@
"defaultMessage": "Verhelder de samenvatting"
},
"nags.summary-too-short.description": {
"defaultMessage": "Je samenvatting is {length, plural,one {# character} other {# characters}}. Minimaal {minChars, plural, one {# character}} is aanbevolen om een informatieve en interessante samevatting te maken."
"defaultMessage": "Je samenvatting is {length, plural, one {# character} other {# characters}}. Minimaal {minChars, plural, one {# character} other {# characters}} is aanbevolen om een informatieve en interessante samevatting te maken."
},
"nags.summary-too-short.title": {
"defaultMessage": "Breidt de samenvatting uit"
@@ -225,7 +225,7 @@
"defaultMessage": "Selecione etiquetas específicas"
},
"nags.upload-gallery-image.description": {
"defaultMessage": "Pelo menos uma imagem da galeria é requerida para mostrar o conteúdo do seu {type, select, resourcepack {pacto de recursos, com excessão do áudio e pacotes de localização. Se isto descreve seu pacote, por favor selecione a etiqueta apropriada} shader {shader} other {projeto}}."
"defaultMessage": "Pelo menos uma imagem da galeria é requerida para mostrar o conteúdo do seu {type, select, resourcepack {pacote de recursos, com exceção do áudio e pacotes de localização. Se isto descreve seu pacote, por favor selecione a etiqueta apropriada} shader {sombreador} other {projeto}}."
},
"nags.upload-gallery-image.title": {
"defaultMessage": "Envie uma imagem para a galeria"
@@ -159,7 +159,7 @@
"defaultMessage": "Selectați o limbă"
},
"nags.select-license.description": {
"defaultMessage": "Selectați licența sub care este distribuit {type, select mod {mod} modpack {modpack} resourcepack {resourcepack} shader {shader} plugin {plugin} datapack {datapack} other {project}} dumneavoastră."
"defaultMessage": "Selectați licența sub care este distribuit {type, select, mod {mod} modpack {modpack} resourcepack {resourcepack} shader {shader} plugin {plugin} datapack {datapack} other {project}} dumneavoastră."
},
"nags.select-license.title": {
"defaultMessage": "Selectează o licență"
@@ -225,7 +225,7 @@
"defaultMessage": "Chọn các thẻ chính xác"
},
"nags.upload-gallery-image.description": {
"defaultMessage": "Cần có ít nhất một hình ảnh trong thư viện để giới thiệu nội dung của {type, select, resourcepack {gói tài nguyên} shader {shader} other {dự án}} của bạn, ngoại trừ các gói âm thanh hoặc bản địa hóa. Nếu điều này đúng với gói của bạn, vui lòng chọn thẻ phù hợp {shader {shader} other {project}}."
"defaultMessage": "Cần có ít nhất một hình ảnh trong thư viện để giới thiệu nội dung của {type, select, resourcepack {gói tài nguyên của bạn, ngoại trừ các gói âm thanh hoặc bản địa hóa. Nếu điều này đúng với gói của bạn, vui lòng chọn thẻ phù hợp} shader {shader} other {dự án}}."
},
"nags.upload-gallery-image.title": {
"defaultMessage": "Tải lên hình ảnh thư viện"
@@ -2,7 +2,7 @@ import { useSessionStorage } from '@vueuse/core'
import type { Ref } from 'vue'
import { computed, ref, watch } from 'vue'
import { useVIntl } from '#ui/composables/i18n'
import { defineMessages, useVIntl } from '#ui/composables/i18n'
import { commonProjectTypeCategoryMessages, normalizeProjectType } from '#ui/utils/common-messages'
import type { ClientWarningType, ContentItem } from '../types'
@@ -33,6 +33,25 @@ export interface ContentFilterConfig {
persistKey?: string
}
const messages = defineMessages({
updates: {
id: 'content.filter.updates',
defaultMessage: 'Updates',
},
warnings: {
id: 'content.filter.warnings',
defaultMessage: 'Warnings',
},
enabled: {
id: 'content.filter.enabled',
defaultMessage: 'Enabled',
},
disabled: {
id: 'content.filter.disabled',
defaultMessage: 'Disabled',
},
})
export function useContentFilters(items: Ref<ContentItem[]>, config?: ContentFilterConfig) {
const { formatMessage } = useVIntl()
@@ -40,6 +59,13 @@ export function useContentFilters(items: Ref<ContentItem[]>, config?: ContentFil
? useSessionStorage<string[]>(`content-filters:${config.persistKey}`, [])
: ref<string[]>([])
const availableStatusFilters = computed<Array<'enabled' | 'disabled'>>(() => {
const hasEnabledContent = items.value.some((m) => m.enabled)
const hasDisabledContent = items.value.some((m) => !m.enabled)
return hasEnabledContent && hasDisabledContent ? ['enabled', 'disabled'] : []
})
const filterOptions = computed<ContentFilterOption[]>(() => {
const options: ContentFilterOption[] = []
@@ -59,27 +85,48 @@ export function useContentFilters(items: Ref<ContentItem[]>, config?: ContentFil
}
if (config?.showUpdateFilter && items.value.some((m) => m.has_update)) {
options.push({ id: 'updates', label: 'Updates' })
options.push({ id: 'updates', label: formatMessage(messages.updates) })
}
if (config?.showWarningsFilter && items.value.some((m) => getClientWarningType(m) !== null)) {
options.push({ id: 'warnings', label: 'Warnings' })
options.push({ id: 'warnings', label: formatMessage(messages.warnings) })
}
if (items.value.some((m) => !m.enabled)) {
options.push({ id: 'disabled', label: 'Disabled' })
for (const status of availableStatusFilters.value) {
options.push({
id: status,
label: formatMessage(status === 'enabled' ? messages.enabled : messages.disabled),
})
}
return options
})
watch(filterOptions, () => {
selectedFilters.value = selectedFilters.value.filter((f) =>
filterOptions.value.some((opt) => opt.id === f),
)
})
watch(
filterOptions,
() => {
selectedFilters.value = selectedFilters.value.filter((f) =>
filterOptions.value.some((opt) => opt.id === f),
)
},
{ immediate: true },
)
function toggleFilter(filterId: string) {
if (filterId === 'enabled' || filterId === 'disabled') {
const index = selectedFilters.value.indexOf(filterId)
const otherStatusFilter = filterId === 'enabled' ? 'disabled' : 'enabled'
if (index === -1) {
selectedFilters.value = [
...selectedFilters.value.filter((filter) => filter !== otherStatusFilter),
filterId,
]
} else {
selectedFilters.value.splice(index, 1)
}
return
}
const index = selectedFilters.value.indexOf(filterId)
if (index === -1) {
selectedFilters.value.push(filterId)
@@ -91,7 +138,7 @@ export function useContentFilters(items: Ref<ContentItem[]>, config?: ContentFil
function applyFilters(source: ContentItem[]): ContentItem[] {
if (selectedFilters.value.length === 0) return source
const attributeFilters = new Set(['updates', 'disabled', 'warnings'])
const attributeFilters = new Set(['updates', 'enabled', 'disabled', 'warnings'])
const typeFilters = selectedFilters.value.filter((f) => !attributeFilters.has(f))
const activeAttributes = selectedFilters.value.filter((f) => attributeFilters.has(f))
@@ -105,6 +152,7 @@ export function useContentFilters(items: Ref<ContentItem[]>, config?: ContentFil
for (const filter of activeAttributes) {
if (filter === 'updates' && !item.has_update) return false
if (filter === 'enabled' && !item.enabled) return false
if (filter === 'disabled' && item.enabled) return false
if (filter === 'warnings' && getClientWarningType(item) === null) return false
}
-3
View File
@@ -1376,9 +1376,6 @@
"servers.region.custom.prompt": {
"defaultMessage": "Kolik RAM chcete, aby váš server měl?"
},
"servers.region.north-america": {
"defaultMessage": "Severní Amerika"
},
"servers.region.prompt": {
"defaultMessage": "Kde byste chtěli umístit svůj server?"
},
-3
View File
@@ -1154,9 +1154,6 @@
"servers.region.custom.prompt": {
"defaultMessage": "Hvor meget RAM vil du have din server har?"
},
"servers.region.north-america": {
"defaultMessage": "Nordamerika"
},
"servers.region.prompt": {
"defaultMessage": "Hvor vil du gerne have din server er lokaliseret?"
},
+11 -2
View File
@@ -1658,6 +1658,15 @@
"instances.updater-modal.hide-incompatible": {
"defaultMessage": "Inkompatible ausblenden"
},
"instances.updater-modal.incompatible-update.description": {
"defaultMessage": "{version} ist nicht als kompatibel mit dieser Installation markiert. Sie wird sich villeicht unerwartet verhalten."
},
"instances.updater-modal.incompatible-update.header": {
"defaultMessage": "Auf eine kompatible Version aktualisieren?"
},
"instances.updater-modal.incompatible-update.proceed": {
"defaultMessage": "Trotzdem aktualisieren"
},
"instances.updater-modal.loading-changelog": {
"defaultMessage": "Lade Änderungsprotokoll..."
},
@@ -3701,8 +3710,8 @@
"servers.region.custom.prompt-ram-only": {
"defaultMessage": "RAM"
},
"servers.region.north-america": {
"defaultMessage": "Nordamerika"
"servers.region.north-america-central": {
"defaultMessage": "Zentral Nordamerika"
},
"servers.region.prompt": {
"defaultMessage": "Wo soll dein Server sich befinden?"
+11 -2
View File
@@ -1658,6 +1658,15 @@
"instances.updater-modal.hide-incompatible": {
"defaultMessage": "Inkompatible ausblenden"
},
"instances.updater-modal.incompatible-update.description": {
"defaultMessage": "{version} ist nicht als kompatibel mit dieser Installation markiert. Sie wird sich villeicht unerwartet verhalten."
},
"instances.updater-modal.incompatible-update.header": {
"defaultMessage": "Auf eine kompatible Version aktualisieren?"
},
"instances.updater-modal.incompatible-update.proceed": {
"defaultMessage": "Trotzdem aktualisieren"
},
"instances.updater-modal.loading-changelog": {
"defaultMessage": "Lade Änderungsprotokoll..."
},
@@ -3701,8 +3710,8 @@
"servers.region.custom.prompt-ram-only": {
"defaultMessage": "RAM"
},
"servers.region.north-america": {
"defaultMessage": "Nordamerika"
"servers.region.north-america-central": {
"defaultMessage": "Zentral Nordamerika"
},
"servers.region.prompt": {
"defaultMessage": "Wo soll sich dein Server befinden?"
+12
View File
@@ -398,6 +398,18 @@
"content.diff-modal.updated-count": {
"defaultMessage": "{count} updated"
},
"content.filter.disabled": {
"defaultMessage": "Disabled"
},
"content.filter.enabled": {
"defaultMessage": "Enabled"
},
"content.filter.updates": {
"defaultMessage": "Updates"
},
"content.filter.warnings": {
"defaultMessage": "Warnings"
},
"content.inline-backup.backing-up": {
"defaultMessage": "Creating backup..."
},
+25 -7
View File
@@ -105,7 +105,7 @@
"defaultMessage": "Estás actualmente desconectado. ¡Conéctate a internet para buscar en Modrinth!"
},
"browse.search.placeholder": {
"defaultMessage": "Buscar {projectType, select, mod {mods} modpack {modpacks} packs de recursos {resource packs} shader {shaders} plugin {plugins} datapack {datapacks} servidores {servers} otros {projects}}..."
"defaultMessage": "Buscar {projectType, select, mod {mods} modpack {modpacks} resourcepack {paquetes de recursos} shader {shaders} plugin {plugins} datapack {datapacks} server {servidores} other {proyectos}}..."
},
"browse.selected-projects-floating-bar.aria-label": {
"defaultMessage": "Proyectos seleccionados"
@@ -348,10 +348,10 @@
"defaultMessage": "Advertencia de borrado"
},
"content.confirm-deletion.delete-button": {
"defaultMessage": "Eliminar {count} {itemType}{count, plural, uno {} otro {s}}"
"defaultMessage": "Eliminar {count} {itemType}{count, plural, one {} other{s}}"
},
"content.confirm-deletion.header": {
"defaultMessage": "Eliminar {itemType}{count, plural, uno {} otro {s}}"
"defaultMessage": "Eliminar {itemType}{count, plural, one {} other {s}}"
},
"content.confirm-modpack-update.admonition-body": {
"defaultMessage": "{action, select, downgrade {Bajar de versión} other {Actualizar}} puede causar problemas de compatibilidad. Los mods o contenido que agregaste sobre el modpack se mantendrán, pero podrían no ser compatibles con la nueva versión."
@@ -1658,6 +1658,15 @@
"instances.updater-modal.hide-incompatible": {
"defaultMessage": "Ocultar incompatible"
},
"instances.updater-modal.incompatible-update.description": {
"defaultMessage": "{version} no está marcada como compatible con esta instalación. Puede lanzar error al iniciar o comportarse de manera inesperada."
},
"instances.updater-modal.incompatible-update.header": {
"defaultMessage": "¿Actualizar a una versión incompatible?"
},
"instances.updater-modal.incompatible-update.proceed": {
"defaultMessage": "Actualizar aún así"
},
"instances.updater-modal.loading-changelog": {
"defaultMessage": "Cargando el registro de cambios..."
},
@@ -2150,6 +2159,9 @@
"markdown-editor.upload-error.no-file": {
"defaultMessage": "Falta el archivo"
},
"markdown-editor.upload-error.no-handler": {
"defaultMessage": "No se especificó un método de subida de imagen"
},
"markdown-editor.url-label": {
"defaultMessage": "URL"
},
@@ -2904,7 +2916,7 @@
"defaultMessage": "Este de EE. UU."
},
"project.server.region.us_west": {
"defaultMessage": "Oste de EE. UU."
"defaultMessage": "Oeste de EE. UU."
},
"project.server.status.offline": {
"defaultMessage": "Sin conexión"
@@ -2973,7 +2985,7 @@
"defaultMessage": "Solo los proyectos de tipo mod o modpack pueden tener metadatos de entorno."
},
"project.settings.environment.notice.wrong-project-type.title": {
"defaultMessage": "Este tipo de proyecto no es compatible con metadatos de entorno."
"defaultMessage": "Este tipo de proyecto no es compatible con metadatos de entorno"
},
"project.settings.environment.server_only.dedicated_only.title": {
"defaultMessage": "Solo servidor dedicado"
@@ -3698,8 +3710,14 @@
"servers.region.custom.prompt-ram-only": {
"defaultMessage": "RAM"
},
"servers.region.north-america": {
"defaultMessage": "Norteamérica"
"servers.region.north-america-central": {
"defaultMessage": "Norteamérica Central"
},
"servers.region.north-america-east": {
"defaultMessage": "Norteamérica del Este"
},
"servers.region.north-america-west": {
"defaultMessage": "Norteamérica del Oeste"
},
"servers.region.prompt": {
"defaultMessage": "¿Dónde te gustaría que se ubicara tu servidor?"
-3
View File
@@ -3413,9 +3413,6 @@
"servers.region.custom.prompt-ram-only": {
"defaultMessage": "Memoria"
},
"servers.region.north-america": {
"defaultMessage": "América del Norte"
},
"servers.region.prompt": {
"defaultMessage": "¿Dónde le gustaría que estuviera ubicado su servidor?"
},
-3
View File
@@ -524,9 +524,6 @@
"servers.region.central-europe": {
"defaultMessage": "Keski-Eurooppa"
},
"servers.region.north-america": {
"defaultMessage": "Pohjois-Amerikka"
},
"servers.region.prompt": {
"defaultMessage": "Missä haluaisit palvelimesi sijaitsevan?"
},
+6 -3
View File
@@ -656,6 +656,12 @@
"instances.updater-modal.hide-incompatible": {
"defaultMessage": "Taguin ang di-magkakatugma"
},
"instances.updater-modal.incompatible-update.header": {
"defaultMessage": "I-update sa di-magkatugmang bersiyon?"
},
"instances.updater-modal.incompatible-update.proceed": {
"defaultMessage": "I-update pa rin"
},
"instances.updater-modal.no-changelog": {
"defaultMessage": "Walang changelog para bersiyong ito."
},
@@ -2060,9 +2066,6 @@
"servers.region.custom.prompt-ram-only": {
"defaultMessage": "RAM"
},
"servers.region.north-america": {
"defaultMessage": "Hilagang Amerika"
},
"servers.region.prompt": {
"defaultMessage": "Saan mo nais malagay ang server mo?"
},
+28 -13
View File
@@ -24,7 +24,7 @@
"defaultMessage": "Créé par {user}"
},
"affiliate.creating.button": {
"defaultMessage": "Création d'un lien d'affiliation..."
"defaultMessage": "Création du lien en cours..."
},
"affiliate.revoke": {
"defaultMessage": "Révoquer un lien d'affiliation"
@@ -51,40 +51,40 @@
"defaultMessage": "Annuler"
},
"billing.resubscribe-modal.cpus": {
"defaultMessage": "{sharedCpus} processeurs partagés"
"defaultMessage": "{sharedCpus} CPU partagés"
},
"billing.resubscribe-modal.description": {
"defaultMessage": "Vous êtes sur le point de vous réabonner à <server-name>{serverName}</server-name>. Votre abonnement sera réactivé et votre serveur pourra continuer à être exécuté sans interruption."
"defaultMessage": "Vous êtes sur le point de vous réabonner à <server-name>{serverName}</server-name>. Votre abonnement sera réactivé et votre serveur pourra continuer à fonctionner sans interruption."
},
"billing.resubscribe-modal.error.text": {
"defaultMessage": "Vous ne pouvez pas vous réabonner, impossible de charger les détails d'abonnement."
"defaultMessage": "Vous ne pouvez pas vous réabonner, car il est impossible de charger les détails de l'abonnement."
},
"billing.resubscribe-modal.error.title": {
"defaultMessage": "Erreur"
},
"billing.resubscribe-modal.failed-load": {
"defaultMessage": "Impossible de charger les détails d'abonnement."
"defaultMessage": "Impossible de charger les détails de l'abonnement."
},
"billing.resubscribe-modal.interval.five-days": {
"defaultMessage": " / 5 jours"
"defaultMessage": "/ 5 jours"
},
"billing.resubscribe-modal.interval.monthly": {
"defaultMessage": " / mois"
"defaultMessage": "/ mois"
},
"billing.resubscribe-modal.interval.quarterly": {
"defaultMessage": " / trimestre"
"defaultMessage": "/ trimestre"
},
"billing.resubscribe-modal.interval.yearly": {
"defaultMessage": " / an"
"defaultMessage": "/ an"
},
"billing.resubscribe-modal.next-charge": {
"defaultMessage": "Votre prochaine charge sera le <charge-date>{date}</charge-date>."
"defaultMessage": "Votre prochain paiement sera le <charge-date>{date}</charge-date>."
},
"billing.resubscribe-modal.plan-label": {
"defaultMessage": "Forfait"
},
"billing.resubscribe-modal.ram": {
"defaultMessage": "{ramGb} Go de mémoire vive"
"defaultMessage": "{ramGb} Go de mémoire RAM"
},
"billing.resubscribe-modal.resubscribe": {
"defaultMessage": "Se réabonner"
@@ -1658,6 +1658,15 @@
"instances.updater-modal.hide-incompatible": {
"defaultMessage": "Cacher les incompatibles"
},
"instances.updater-modal.incompatible-update.description": {
"defaultMessage": "{version} n'est pas compatible avec cette installation. Le lancement peut échouer ou le comportement peut être inattendu."
},
"instances.updater-modal.incompatible-update.header": {
"defaultMessage": "Mettre à jour vers une version incompatible?"
},
"instances.updater-modal.incompatible-update.proceed": {
"defaultMessage": "Mettre à jour quand même"
},
"instances.updater-modal.loading-changelog": {
"defaultMessage": "Chargement du journal de modification..."
},
@@ -3701,8 +3710,14 @@
"servers.region.custom.prompt-ram-only": {
"defaultMessage": "Mémoire vive"
},
"servers.region.north-america": {
"defaultMessage": "Amérique du Nord"
"servers.region.north-america-central": {
"defaultMessage": "Amérique du Nord centrale"
},
"servers.region.north-america-east": {
"defaultMessage": "Est de l'Amérique du Nord"
},
"servers.region.north-america-west": {
"defaultMessage": "Ouest de l'Amérique du Nord"
},
"servers.region.prompt": {
"defaultMessage": "Où souhaitez-vous que votre serveur soit situé ?"
+9 -3
View File
@@ -32,6 +32,9 @@
"affiliate.viewAnalytics": {
"defaultMessage": "צפה ניתוחים"
},
"app.server-settings.failed-to-load-server": {
"defaultMessage": "טעינת הגרסה נכשלה"
},
"badge.beta": {
"defaultMessage": "בטא"
},
@@ -41,6 +44,12 @@
"badge.new": {
"defaultMessage": "חדש"
},
"browse.selected-projects-leave-modal.header": {
"defaultMessage": "הפרויקטים שנבחרו עוד לא הותקנו"
},
"browse.view-prefix": {
"defaultMessage": "לראות:"
},
"button.accept": {
"defaultMessage": "קבל"
},
@@ -1079,9 +1088,6 @@
"servers.region.custom.prompt": {
"defaultMessage": "כמה זיכרון RAM תרצה שהשרת שלך יקבל?"
},
"servers.region.north-america": {
"defaultMessage": "צפון אמריקה"
},
"servers.region.prompt": {
"defaultMessage": "באיזה מיקום תרצה שהשרת שלך יימצא?"
},
+7 -10
View File
@@ -465,7 +465,7 @@
"defaultMessage": "Kérjük, várjon"
},
"content.page-layout.search-placeholder": {
"defaultMessage": "Keresés {count} {contentType} között..."
"defaultMessage": "Keresés {count} {contentType, select, mod {mod} mods {mod} plugin {bővítmény} plugins {bővítmény} datapack {adatcsomag} datapacks {adatcsomag} project {projekt} projects {projekt} other {tartalom}} között..."
},
"content.page-layout.share.file-names": {
"defaultMessage": "Fájlnevek"
@@ -510,7 +510,7 @@
"defaultMessage": "{progress}/{total} {contentType} törlése..."
},
"content.selection-bar.bulk.deleting-waiting": {
"defaultMessage": "{contentType} törlése..."
"defaultMessage": "{contentType, select, mod {Mod} mods {Modok} plugin {Bővítmény} plugins {Bővítmények} datapack {Adatcsomag} datapacks {Adatcsomagok} project {Projekt} projects {Projektek} other {Tartalom}} törlése..."
},
"content.selection-bar.bulk.disabling": {
"defaultMessage": "{progress}/{total} {contentType} letiltása..."
@@ -531,7 +531,7 @@
"defaultMessage": "{contentType} frissítése..."
},
"content.selection-bar.selected-count": {
"defaultMessage": "{count} {contentType} kiválasztva"
"defaultMessage": "{count} {contentType, select, mod {mod} mods {mod} plugin {bővítmény} plugins {bővítmény} datapack {adatcsomag} datapacks {adatcsomag} project {projekt} projects {projekt} other {tartalom}} kiválasztva"
},
"content.selection-bar.selected-count-simple": {
"defaultMessage": "{count, number} kiválasztva"
@@ -756,7 +756,7 @@
"defaultMessage": "Profil importálása"
},
"creation-flow.modal.setup-type.option.modpack-base.description": {
"defaultMessage": "Böngészd a modcsomagokat a Modrinthon, vagy tölts be egyet fájlból."
"defaultMessage": "Böngéssz modcsomagokat a Modrinthon, vagy tölts be egyet fájlból."
},
"creation-flow.modal.setup-type.option.modpack-base.title": {
"defaultMessage": "Modcsomag letöltése"
@@ -2796,7 +2796,7 @@
"defaultMessage": "Mindkettőn opcionális; mindkét oldalon történő letöltés esetén működik a legjobban"
},
"project.settings.environment.client_and_server.optional_both_prefers_both.title": {
"defaultMessage": "Mindkettőn opciónális; legjobb ha mindkét oldalon telepítve van"
"defaultMessage": "Mindkettőn opcionális; legjobb ha mindkét oldalon telepítve van"
},
"project.settings.environment.client_and_server.optional_client.title": {
"defaultMessage": "Opcionális kliensen"
@@ -2805,7 +2805,7 @@
"defaultMessage": "Opcionális szerveren"
},
"project.settings.environment.client_and_server.required_both.title": {
"defaultMessage": "Minda kettön kell"
"defaultMessage": "Mindkettőn kötelező"
},
"project.settings.environment.client_and_server.title": {
"defaultMessage": "Kliens és szerver"
@@ -2838,7 +2838,7 @@
"defaultMessage": "Minden funkció szerveroldalon történik, és kompatibilis a vanilla klinesekkel."
},
"project.settings.environment.server_only.supports_singleplayer.title": {
"defaultMessage": "Mükszik Egyjátékos módban is"
"defaultMessage": "Működik egyjátékos módban is"
},
"project.settings.environment.server_only.title": {
"defaultMessage": "Csak szerveroldali"
@@ -3398,9 +3398,6 @@
"servers.region.custom.prompt-ram-only": {
"defaultMessage": "memória"
},
"servers.region.north-america": {
"defaultMessage": "Észak-Amerika"
},
"servers.region.prompt": {
"defaultMessage": "Hol szeretnéd elhelyezni a szerveredet?"
},
-3
View File
@@ -2033,9 +2033,6 @@
"servers.region.custom.prompt": {
"defaultMessage": "Berapa besar RAM yang diinginkan untuk server Anda?"
},
"servers.region.north-america": {
"defaultMessage": "Amerika Utara"
},
"servers.region.prompt": {
"defaultMessage": "Lokasi manakah yang Anda inginkan untuk server Anda?"
},
+30 -3
View File
@@ -398,6 +398,18 @@
"content.diff-modal.updated-count": {
"defaultMessage": "{count, plural, one {# aggiornamento} other {# aggiornamenti}}"
},
"content.filter.disabled": {
"defaultMessage": "Disabilitati"
},
"content.filter.enabled": {
"defaultMessage": "Abilitati"
},
"content.filter.updates": {
"defaultMessage": "Aggiornamenti"
},
"content.filter.warnings": {
"defaultMessage": "Avvisi"
},
"content.inline-backup.backing-up": {
"defaultMessage": "Creando il backup..."
},
@@ -1658,6 +1670,15 @@
"instances.updater-modal.hide-incompatible": {
"defaultMessage": "Nascondi incompatibili"
},
"instances.updater-modal.incompatible-update.description": {
"defaultMessage": "La {version} non è contrassegnata come compatibile per questa installazione. Potrebbe avere comportamenti imprevisti o errori nell'avvio."
},
"instances.updater-modal.incompatible-update.header": {
"defaultMessage": "Aggiornare alla versione incompatibile?"
},
"instances.updater-modal.incompatible-update.proceed": {
"defaultMessage": "Aggiorna comunque"
},
"instances.updater-modal.loading-changelog": {
"defaultMessage": "Caricando le informazioni..."
},
@@ -2898,7 +2919,7 @@
"defaultMessage": "Russia"
},
"project.server.region.south_america": {
"defaultMessage": "America meridionale"
"defaultMessage": "Sud America"
},
"project.server.region.tooltip": {
"defaultMessage": "Server situato in {regionName}"
@@ -3701,8 +3722,14 @@
"servers.region.custom.prompt-ram-only": {
"defaultMessage": "RAM"
},
"servers.region.north-america": {
"defaultMessage": "America settentrionale"
"servers.region.north-america-central": {
"defaultMessage": "Nord America centrale"
},
"servers.region.north-america-east": {
"defaultMessage": "Nord America orientale"
},
"servers.region.north-america-west": {
"defaultMessage": "Nord America occidentale"
},
"servers.region.prompt": {
"defaultMessage": "Dove vorresti che il tuo server sia situato?"

Some files were not shown because too many files have changed in this diff Show More