sync: 2022-07-17 14:03:55 +0000

This commit is contained in:
mosasauroidea-bot
2022-07-17 14:03:55 +00:00
parent 372108a120
commit 63f08320cd
41 changed files with 230 additions and 240 deletions
+4 -4
View File
@@ -1228,15 +1228,15 @@ WHERE ud.TorrentID=? AND ui.NotifyOnDeleteDownloaded='1' AND ud.UserID NOT IN ({
$Info[] = Format::torrent_label(Lang::get('torrents', 'fld'), 'tl_free torrent_discount free');
} else if (isset($Data['FreeTorrent'])) {
if ($Data['FreeTorrent'] == '1') {
$Info[] = Format::torrent_label(Lang::get('torrents', 'fld'), 'tl_free torrent_discount free', ($Data['FreeEndTime'] ? Lang::get('torrents', 'free_left', false, time_diff($Data['FreeEndTime'], 2, false)) : ""));
$Info[] = Format::torrent_label(Lang::get('torrents', 'fld'), 'tl_free torrent_discount free', ($Data['FreeEndTime'] ? Lang::get('torrents', 'free_left', false, [], time_diff($Data['FreeEndTime'], 2, false)) : ""));
} else if ($Data['FreeTorrent'] == '2') {
$Info[] = Format::torrent_label('Neutral Leech!', 'torrent_discount neutral');
} else if ($Data['FreeTorrent'] == '11') {
$Info[] = Format::torrent_label('-25%', 'torrent_discount one_fourth_off', ($Data['FreeEndTime'] ? Lang::get('torrents', 'free_left', false, time_diff($Data['FreeEndTime'], 2, false)) : ""));
$Info[] = Format::torrent_label('-25%', 'torrent_discount one_fourth_off', ($Data['FreeEndTime'] ? Lang::get('torrents', 'free_left', false, [], time_diff($Data['FreeEndTime'], 2, false)) : ""));
} else if ($Data['FreeTorrent'] == '12') {
$Info[] = Format::torrent_label('-50%', 'torrent_discount two_fourth_off', ($Data['FreeEndTime'] ? Lang::get('torrents', 'free_left', false, time_diff($Data['FreeEndTime'], 2, false)) : ""));
$Info[] = Format::torrent_label('-50%', 'torrent_discount two_fourth_off', ($Data['FreeEndTime'] ? Lang::get('torrents', 'free_left', false, [], time_diff($Data['FreeEndTime'], 2, false)) : ""));
} else if ($Data['FreeTorrent'] == '13') {
$Info[] = Format::torrent_label('-75%', 'torrent_discount three_fourth_off', ($Data['FreeEndTime'] ? Lang::get('torrents', 'free_left', false, time_diff($Data['FreeEndTime'], 2, false)) : ""));
$Info[] = Format::torrent_label('-75%', 'torrent_discount three_fourth_off', ($Data['FreeEndTime'] ? Lang::get('torrents', 'free_left', false, [], time_diff($Data['FreeEndTime'], 2, false)) : ""));
}
}
if ($Option['Self']) {
+1 -1
View File
@@ -2,7 +2,7 @@
"compilerOptions": {
"baseUrl": ".",
"paths": {
"#/*": ["src/js/*"]
"#/*": ["src/*"]
}
}
}
+2 -2
View File
@@ -28,7 +28,7 @@ function ConfirmPurchase(event, item, next, element) {
event.preventDefault()
return false
}
check = confirm(translation.format(translation.get('confirm_purchase'), item))
check = confirm(lang.format(lang.get('common.confirm_purchase'), item))
if (!check) {
event.preventDefault()
return false
@@ -39,7 +39,7 @@ function ConfirmPurchase(event, item, next, element) {
* @return {boolean}
*/
function ConfirmOther(event, element) {
var name = prompt(translation.get('confirm_username'))
var name = prompt(lang.get('common.confirm_username'))
if (!name || name === '') {
return false
}
+6 -6
View File
@@ -197,17 +197,17 @@ globalapp.browseAddArtistField = function browseAddArtistField() {
Importance.name = 'importance[]'
Importance.innerHTML =
'<option class="Select-option" value="1">' +
translation.get('director') +
lang.get('common.director') +
'</option><option class="Select-option" value="2">' +
translation.get('writer') +
lang.get('common.writer') +
'</option><option class="Select-option" value="3">' +
translation.get('producer') +
lang.get('common.producer') +
'</option><option class="Select-option" value="4">' +
translation.get('composer') +
lang.get('common.composer') +
'</option><option class="Select-option" value="5">' +
translation.get('cinematographer') +
lang.get('common.cinematographer') +
'</option><option class="Select-option" value="6">' +
translation.get('actor') +
lang.get('common.actor') +
'</option>'
x.appendChild(Importance)
if ($('#artist').data('gazelle-autocomplete')) {
+5 -4
View File
@@ -134,7 +134,7 @@ function Edit_Form(post, key) {
.attr('href')
.split('=')[1]
if (postuserid != userid) {
pmbox = translation.format(translation.get('pm_user_on_edit'), postid)
pmbox = lang.format(lang.get('common.pm_user_on_edit'), postid)
} else {
pmbox = ''
}
@@ -194,7 +194,7 @@ function Edit_Form(post, key) {
}
function Cancel_Edit(postid) {
var answer = confirm(translation.get('are_you_sure_you_want_to_cancel'))
var answer = confirm(lang.get('common.are_you_sure_you_want_to_cancel'))
if (answer) {
$('#reply_box').gshow()
$('#bar' + postid).raw().innerHTML = $('#bar' + postid).raw().oldbar
@@ -263,8 +263,9 @@ function Save_Edit(postid) {
function Delete(post) {
postid = post
if (
confirm(translation.get('are_you_sure_you_wish_to_delete_this_post')) ==
true
confirm(
lang.get('common.common.are_you_sure_you_wish_to_delete_this_post')
) == true
) {
if (location.href.match(/forums\.php/)) {
ajax.get(
+2 -2
View File
@@ -31,7 +31,7 @@
$('input[id^=outcome]').click(function () {
if (
$(this).val() != 'Discard' &&
!confirm(translation.get('are_you_sure_cannot_undone'))
!confirm(lang.get('common.are_you_sure_cannot_undone'))
) {
return false
}
@@ -79,7 +79,7 @@
}).done(function (response) {
if (response['status'] == 'success') {
$('#row_' + id).remove()
alert(translation.get('request_has_been_unresolved'))
alert(lang.get('common.request_has_been_unresolved'))
} else {
alert(response['status'])
}
+3 -3
View File
@@ -1,10 +1,10 @@
$(document).ready(function () {
$('.forum_category').click(function (e) {
var id = this.id
var isChecked = $(this).text() != translation.get('check_all')
var isChecked = $(this).text() != lang.get('common.check_all')
isChecked
? $(this).text(translation.get('check_all'))
: $(this).text(translation.get('uncheck_all'))
? $(this).text(lang.get('common.check_all'))
: $(this).text(lang.get('common.uncheck_all'))
$("input[data-category='" + id + "']").attr('checked', !isChecked)
e.preventDefault()
})
+20 -16
View File
@@ -308,33 +308,37 @@
},
messages: {
required: translation.get('this_field_is_required'),
remote: translation.get('please_fix_this_field'),
email: translation.get('please_enter_a_valid_email_address'),
url: translation.get('please_enter_a_valid_url'),
date: translation.get('please_enter_a_valid_date'),
dateISO: translation.get('please_enter_a_valid_date_iso'),
number: translation.get('please_enter_a_valid_date_number'),
digits: translation.get('please_enter_only_digits'),
creditcard: translation.get('please_enter_a_valid_credit_card_number'),
equalTo: translation.get('please_enter_the_same_value_again'),
required: lang.get('validation.this_field_is_required'),
remote: lang.get('validation.please_fix_this_field'),
email: lang.get('validation.please_enter_a_valid_email_address'),
url: lang.get('validation.please_enter_a_valid_url'),
date: lang.get('validation.please_enter_a_valid_date'),
dateISO: lang.get('validation.please_enter_a_valid_date_iso'),
number: lang.get('validation.please_enter_a_valid_date_number'),
digits: lang.get('validation.please_enter_only_digits'),
creditcard: lang.get(
'validation.please_enter_a_valid_credit_card_number'
),
equalTo: lang.get('validation.please_enter_the_same_value_again'),
maxlength: $.validator.format(
translation.get('please_enter_no_more_than_n_characters')
lang.get('validation.please_enter_no_more_than_n_characters')
),
minlength: $.validator.format(
translation.get('please_enter_at_least_n_characters')
lang.get('validataion.please_enter_at_least_n_characters')
),
rangelength: $.validator.format(
translation.get('please_enter_a_value_between_x_and_y_characters_long')
lang.get(
'validataion.please_enter_a_value_between_x_and_y_characters_long'
)
),
range: $.validator.format(
translation.get('please_enter_a_value_between_x_and_y')
lang.get('validataion.please_enter_a_value_between_x_and_y')
),
max: $.validator.format(
translation.get('please_enter_a_value_less_than_or_equal_to_n')
lang.get('validataion.please_enter_a_value_less_than_or_equal_to_n')
),
min: $.validator.format(
translation.get('please_enter_a_value_greater_than_or_equal_to_n')
lang.get('validataion.please_enter_a_value_greater_than_or_equal_to_n')
),
},
+7 -7
View File
@@ -26,16 +26,16 @@ function SaveMessage(id) {
ajax.post('?action=edit_response', ToPost, function (data) {
if (data == '1') {
document.getElementById(ajax_message).textContent = translation.get(
document.getElementById(ajax_message).textContent = lang.get(
'staffpm.response_created'
)
} else if (data == '2') {
document.getElementById(ajax_message).textContent = translation.get(
document.getElementById(ajax_message).textContent = lang.get(
'staffpm.response_edited'
)
} else {
document.getElementById(ajax_message).textContent =
translation.get('staffpm.error')
lang.get('staffpm.error')
}
$('#' + ajax_message).gshow()
var t = setTimeout("$('#" + ajax_message + "').ghide()", 2000)
@@ -52,12 +52,12 @@ function DeleteMessage(id) {
ajax.post('?action=delete_response', ToPost, function (data) {
$(div).ghide()
if (data == '1') {
document.getElementById(ajax_message).textContent = translation.get(
document.getElementById(ajax_message).textContent = lang.get(
'staffpm.response_deleted'
)
} else {
document.getElementById(ajax_message).textContent =
translation.get('staffpm.error')
lang.get('staffpm.error')
}
$('#' + ajax_message).gshow()
var t = setTimeout("$('#" + ajax_message + "').ghide()", 2000)
@@ -71,12 +71,12 @@ function Assign() {
ajax.post('?action=assign', ToPost, function (data) {
if (data == '1') {
document.getElementById('ajax_message').textContent = translation.get(
document.getElementById('ajax_message').textContent = lang.get(
'staffpm.assign_assigned'
)
} else {
document.getElementById('ajax_message').textContent =
translation.get('staffpm.error')
lang.get('staffpm.error')
}
$('#ajax_message').gshow()
var t = setTimeout("$('#ajax_message').ghide()", 2000)
+4 -4
View File
@@ -13,13 +13,13 @@ function thumb(itemid, userid, type) {
case 'post':
$('#thumb' + itemid + ',#unthumb' + itemid).toggle()
$('#thumbcnt' + itemid).text(
data.count == '0' ? translation.get('like') : data.count
data.count == '0' ? lang.get('common.like') : data.count
)
break
case 'torrent':
$('#thumb' + itemid + ',#unthumb' + itemid).toggle()
$('#thumbcnt' + itemid).text(
data.count == '0' ? translation.get('like') : data.count
data.count == '0' ? lang.get('common.like') : data.count
)
break
}
@@ -42,13 +42,13 @@ function unthumb(itemid, userid, type) {
case 'post':
$('#thumb' + itemid + ',#unthumb' + itemid).toggle()
$('#thumbcnt' + itemid).text(
data.count == '0' ? translation.get('like') : data.count
data.count == '0' ? lang.get('common.like') : data.count
)
break
case 'torrent':
$('#thumb' + itemid + ',#unthumb' + itemid).toggle()
$('#thumbcnt' + itemid).text(
data.count == '0' ? translation.get('like') : data.count
data.count == '0' ? lang.get('common.like') : data.count
)
break
}
+6 -6
View File
@@ -121,27 +121,27 @@ function ArtistManager() {
elImportance.id = 'artists_importance'
var elOpt = document.createElement('option')
elOpt.value = 1
elOpt.innerHTML = translation.get('director')
elOpt.innerHTML = lang.get('common.director')
elImportance.appendChild(elOpt)
elOpt = document.createElement('option')
elOpt.value = 2
elOpt.innerHTML = translation.get('writter')
elOpt.innerHTML = lang.get('writter')
elImportance.appendChild(elOpt)
elOpt = document.createElement('option')
elOpt.value = 3
elOpt.innerHTML = translation.get('producer')
elOpt.innerHTML = lang.get('common.producer')
elImportance.appendChild(elOpt)
elOpt = document.createElement('option')
elOpt.value = 4
elOpt.innerHTML = translation.get('composer')
elOpt.innerHTML = lang.get('common.composer')
elImportance.appendChild(elOpt)
elOpt = document.createElement('option')
elOpt.value = 5
elOpt.innerHTML = translation.get('cinematographer')
elOpt.innerHTML = lang.get('common.cinematographer')
elImportance.appendChild(elOpt)
elOpt = document.createElement('option')
elOpt.value = 6
elOpt.innerHTML = translation.get('actor')
elOpt.innerHTML = lang.get('common.actor')
elImportance.appendChild(elOpt)
elSubmitDiv.appendChild(elImportance)
elSubmitDiv.appendChild(document.createTextNode(' '))
@@ -79,12 +79,12 @@ function createNoty(type, id, message, url, importance) {
buttons: [
{
addClass: 'brackets noty_button_view' + (hideButtons ? ' hidden' : ''),
text: translation.get('view'),
text: lang.get('common.view'),
href: url,
},
{
addClass: 'brackets noty_button_clear',
text: translation.get('clear'),
text: lang.get('common.clear'),
onClick: function ($noty) {
$noty.close()
clear(type, id)
@@ -92,7 +92,7 @@ function createNoty(type, id, message, url, importance) {
},
{
addClass: 'brackets noty_button_close ',
text: translation.get('hide'),
text: lang.get('common.hide'),
onClick: function ($noty) {
$noty.close()
},
@@ -1,10 +1,10 @@
import { useKeyPrevent } from '#/app/hooks'
import { useKeyPrevent } from '#/js/app/hooks'
import {
openElement,
closeElement,
isElementOpen,
} from '#/app/utils/openElement'
import { Dialog } from '#/app/components'
} from '#/js/app/utils/openElement'
import { Dialog } from '#/js/app/components'
import en from './en.mdx'
import chs from './chs.mdx'
@@ -22,7 +22,7 @@ export default function useHelp() {
ID,
<Dialog close={close}>
<Dialog.Title close={close}>
{translation.get('screenshot_comparison.help_title')}
{lang.get('screenshot_comparison.help_title')}
</Dialog.Title>
<Dialog.Body>{select({ en, chs })}</Dialog.Body>
</Dialog>
@@ -31,6 +31,6 @@ export default function useHelp() {
}
function select(Comps) {
const Comp = Comps[translation.lang()]
const Comp = Comps[lang.lang()]
return <Comp />
}
@@ -1,5 +1,5 @@
import pixelmatch from 'pixelmatch'
import { Snackbar } from '#/app/components'
import { Snackbar } from '#/js/app/components'
import { imageDataToDataUrl, fetchImageData } from '../utils/canvas'
export async function active({ context }) {
@@ -13,7 +13,7 @@ export async function active({ context }) {
} = context
// Not set loading if active is fast
const timeout = setTimeout(() => {
Snackbar.open(translation.get('screenshot_comparison.loading'))
Snackbar.open(lang.get('screenshot_comparison.loading'))
}, 1e3)
const img1 = imgRefs[currentRow][0].current
const img2 = imgRefs[currentRow][currentColumn].current
@@ -33,7 +33,7 @@ export async function active({ context }) {
}
)
const imageUrl = imageDataToDataUrl(outputImageData)
const title = `${translation.get('screenshot_comparison.pixel_compare')}: ${
const title = `${lang.get('screenshot_comparison.pixel_compare')}: ${
columnNames[0]
} -> ${columnNames[currentColumn]}`
clearTimeout(timeout)
@@ -1,5 +1,5 @@
import PropTypes from 'prop-types'
import { Dialog } from '#/app/components'
import { Dialog } from '#/js/app/components'
import useScreenshotComparison from './useScreenshotComparison'
import { PixelCompareThreshold } from './PixelCompare'
@@ -88,7 +88,7 @@ const ScreenshotComparison = ({ close, columnNames, images, options }) => {
))}
</div>
<div className="ScreenshotComparison-help">
{translation.get('screenshot_comparison.help')}
{lang.get('screenshot_comparison.help')}
</div>
</div>
)
@@ -1,4 +1,4 @@
import { Snackbar } from '#/app/components'
import { Snackbar } from '#/js/app/components'
import { fetchImageData, imageDataToDataUrl } from '../utils/canvas'
export async function active({ context }) {
@@ -6,7 +6,7 @@ export async function active({ context }) {
context
// Not set loading if active is fast
const timeout = setTimeout(() => {
Snackbar.open(translation.get('screenshot_comparison.loading'))
Snackbar.open(lang.get('screenshot_comparison.loading'))
}, 1e3)
const img = imgRefs[currentRow][currentColumn].current
const width = img.width
@@ -21,7 +21,7 @@ export async function active({ context }) {
curve: solarCurve,
})
const imageUrl = imageDataToDataUrl(outputImageData)
const title = `${translation.get('screenshot_comparison.solar_curve')}: ${
const title = `${lang.get('screenshot_comparison.solar_curve')}: ${
columnNames[currentColumn]
}`
clearTimeout(timeout)
@@ -1,7 +1,7 @@
import { useState, useRef, createRef } from 'react'
import { chunk } from 'lodash-es'
import { useKeyPrevent } from '#/app/hooks'
import { Dialog } from '#/app/components'
import { useKeyPrevent } from '#/js/app/hooks'
import { Dialog } from '#/js/app/components'
import {
usePixelCompare,
pixelCompareHandleCompareChange,
@@ -1,7 +1,7 @@
import { useState, useRef } from 'react'
import { useKeyPrevent } from '#/app/hooks'
import { isGpwHelperInjected } from '#/app/utils'
import { Dialog, Snackbar } from '#/app/components'
import { useKeyPrevent } from '#/js/app/hooks'
import { isGpwHelperInjected } from '#/js/app/utils'
import { Dialog, Snackbar } from '#/js/app/components'
export default function useToggle({
key,
@@ -20,7 +20,7 @@ export default function useToggle({
<Dialog.Body>
<div
dangerouslySetInnerHTML={{
__html: translation.get(
__html: lang.get(
'screenshot_comparison.gpw_helper_not_installed'
),
}}
@@ -1,5 +1,5 @@
import { merge } from 'lodash'
import { Chart } from '#/app/components'
import { Chart } from '#/js/app/components'
import { optionsSingle } from './options'
export const ChartTorrentByDay = () => {
@@ -8,7 +8,7 @@ export const ChartTorrentByDay = () => {
type: 'spline',
},
title: {
text: translation.get('stats.torrentByDay'),
text: lang.get('stats.torrentByDay'),
},
series: [
{
@@ -1,5 +1,5 @@
import { merge } from 'lodash'
import { Chart } from '#/app/components'
import { Chart } from '#/js/app/components'
import { optionsSingle } from './options'
export const ChartTorrentByMonth = () => {
@@ -8,7 +8,7 @@ export const ChartTorrentByMonth = () => {
type: 'spline',
},
title: {
text: translation.get('stats.torrentByMonth'),
text: lang.get('stats.torrentByMonth'),
},
series: [
{
@@ -1,5 +1,5 @@
import { merge } from 'lodash'
import { Chart } from '#/app/components'
import { Chart } from '#/js/app/components'
import { optionsSingle } from './options'
export const ChartTorrentByYear = () => {
@@ -12,7 +12,7 @@ export const ChartTorrentByYear = () => {
type: 'column',
},
title: {
text: translation.get('stats.torrentByYear'),
text: lang.get('stats.torrentByYear'),
},
series: [
{
+1 -1
View File
@@ -1,5 +1,5 @@
import { useRef } from 'react'
import { useKeyPrevent, useEvent } from '#/app/hooks'
import { useKeyPrevent, useEvent } from '#/js/app/hooks'
import useScrollLock from './useScrollLock'
/* Dialog.css */
+1 -1
View File
@@ -1,4 +1,4 @@
import renderElement from '#/app/utils/renderElement'
import renderElement from '#/js/app/utils/renderElement'
import Dialog from './Dialog'
import useScrollLock from './useScrollLock'
+1 -1
View File
@@ -2,7 +2,7 @@ import {
openElement,
closeElement,
isElementOpen,
} from '#/app/utils/openElement'
} from '#/js/app/utils/openElement'
import Snackbar from './Snackbar'
const ID = 'snackbar'
+3 -3
View File
@@ -6,9 +6,9 @@
.u-bbcodePreview-button data-id=<id>
*/
const EDIT = translation.get('bbcode.edit')
const PREVIEW = translation.get('bbcode.preview')
const LOADING = translation.get('bbcode.loading')
const EDIT = lang.get('bbcode.edit')
const PREVIEW = lang.get('bbcode.preview')
const LOADING = lang.get('bbcode.loading')
export default class BBCodePreview {
static register() {
@@ -1,4 +1,4 @@
import '#/forked/mousetrap.min'
import '#/js/forked/mousetrap.min'
import commands from './commands'
/*
+1 -1
View File
@@ -1,4 +1,4 @@
import './i18n' /* set window.tranaction, before everything */
import './lang'
import './bbcode'
import './tooltipster'
import './dropdownMenu'
+1 -1
View File
@@ -33,7 +33,7 @@ async function imgCopy() {
const value = $('#image').val()
if (value) {
await navigator.clipboard.writeText(value)
alert(translation.get('copied'))
alert(lang.get('common.copied'))
}
}
globalapp.imgCopy = imgCopy
@@ -1,15 +1,14 @@
import { get } from 'lodash-es'
import en from '../../../locales/en.yaml'
import zh_CN from '../../../locales/zh_CN.yaml'
import en from '#/locales/en/client.yaml'
import zhCN from '#/locales/zh-CN/client.yaml'
const DEFULAT_LANG = 'en'
const translations = { en, zh_CN }
const translations = { en, chs: zhCN }
window.translation = {
window.lang = {
lang() {
let lang = cookie.get('lang')
lang = lang === 'chs' ? 'zh_CN' : lang
if (!(lang in translations)) {
lang = DEFAULT_LANG
}
+11 -11
View File
@@ -151,15 +151,15 @@ globalapp.reqeustAddArtistField = function requestAddArtistField(
var ImportanceField = document.createElement('select')
ImportanceField.id = 'importance_' + ArtistCount
ImportanceField.name = 'importance[]'
ImportanceField.options[0] = new Option(translation.get('director'), '1')
ImportanceField.options[1] = new Option(translation.get('writer'), '2')
ImportanceField.options[2] = new Option(translation.get('producer'), '3')
ImportanceField.options[3] = new Option(translation.get('composer'), '4')
ImportanceField.options[0] = new Option(lang.get('common.director'), '1')
ImportanceField.options[1] = new Option(lang.get('common.writer'), '2')
ImportanceField.options[2] = new Option(lang.get('common.producer'), '3')
ImportanceField.options[3] = new Option(lang.get('common.composer'), '4')
ImportanceField.options[4] = new Option(
translation.get('cinematographer'),
lang.get('common.cinematographer'),
'5'
)
ImportanceField.options[5] = new Option(translation.get('actor'), '6')
ImportanceField.options[5] = new Option(lang.get('common.actor'), '6')
var x = $('#artistfields').raw()
const div = document.createElement('div')
@@ -237,9 +237,9 @@ globalapp.reqeustMovieAutofill = function requestMovieAutofill() {
return
}
function setError(key, values = []) {
let message = translation.get(key)
let message = lang.get(key)
if (values.length > 0) {
message = translation.format(message, ...values)
message = lang.format(message, ...values)
}
$('.imdb.Form-errorMessage').html(key ? message : '')
}
@@ -256,10 +256,10 @@ globalapp.reqeustMovieAutofill = function requestMovieAutofill() {
if (data.code) {
setError(
data.code === 1
? 'invalid_imdb_link_note'
? 'error.invalid_imdb_link_note'
: data.code === 2
? 'request_torrent_group_exists_note'
: 'imdb_unknown_error',
? 'error.request_torrent_group_exists_note'
: 'error.imdb_unknown_error',
data.code === 2 ? [data.error.GroupID] : []
)
return
+2 -6
View File
@@ -58,14 +58,10 @@ globalapp.toggleEdition = function toggleEdition(event, groupId, editionId) {
for (const toggleButton of toggleButtons) {
if (isHidden) {
toggleButton.innerHTML = BUTTON_COLLAPSE
$(toggleButton).updateTooltip(
translation.get('torrent_table.collapse_edition')
)
$(toggleButton).updateTooltip(lang.get('torrent_table.collapse_edition'))
} else {
toggleButton.innerHTML = BUTTON_EXPAND
$(toggleButton).updateTooltip(
translation.get('torrent_table.expand_edition')
)
$(toggleButton).updateTooltip(lang.get('torrent_table.expand_edition'))
}
}
}
+4 -4
View File
@@ -40,13 +40,13 @@ globalapp.toggleGroup = function toggleGroup(groupid, link, event) {
if (row.has_class('TableTorrent-rowMovieInfo')) {
var section
if (location.pathname.search('/artist.php$') !== -1) {
section = translation.get('in_this_release_type')
section = lang.get('common.in_this_release_type')
} else {
section = translation.get('on_this_page')
section = lang.get('common.on_this_page')
}
var tooltip = showing
? translation.format(translation.get('collapse_this_group'), section)
: translation.format(translation.get('expand_this_group'), section)
? lang.format(lang.get('common.collapse_this_group'), section)
: lang.format(lang.get('common.expand_this_group'), section)
$('.ToggleGroup-button', row).updateTooltip(tooltip)
const parentClassList = $('.ToggleGroup-button', row).raw().parentNode
.classList
+1 -1
View File
@@ -2,7 +2,7 @@
import { useState } from 'react'
import { render } from 'react-dom'
import { ChartTorrentByDay } from '#/app/components'
import { ChartTorrentByDay } from '#/js/app/components'
const StatsHome = () => <ChartTorrentByDay />
+1 -1
View File
@@ -1,5 +1,5 @@
import { render } from 'react-dom'
import { ChartTorrentByMonth, ChartTorrentByYear } from '#/app/components'
import { ChartTorrentByMonth, ChartTorrentByYear } from '#/js/app/components'
const StatsHome = () => (
<>
+1 -1
View File
@@ -1,5 +1,5 @@
import { isArray, isString, isBoolean } from 'lodash-es'
import Videoinfo from '#/modules/Videoinfo'
import Videoinfo from '#/js/modules/Videoinfo'
const SHOW = Symbol('show-action')
+6 -6
View File
@@ -7,9 +7,9 @@ globalapp.uploadMovieAutofill = function uploadMovieAutofill() {
}
}
function setError(key, values = []) {
let message = translation.get(key)
let message = lang.get(key)
if (values.length > 0) {
message = translation.format(message, ...values)
message = lang.format(message, ...values)
}
$('.imdb.Form-errorMessage').html(key ? message : '')
}
@@ -31,7 +31,7 @@ globalapp.uploadMovieAutofill = function uploadMovieAutofill() {
type: 'GET',
error: (err) => {
setLoading(false)
setError('imdb_unknown_error')
setError('common.imdb_unknown_error')
},
success: (data) => {
setLoading(false)
@@ -39,10 +39,10 @@ globalapp.uploadMovieAutofill = function uploadMovieAutofill() {
if (data.code) {
setError(
data.code === 1
? 'invalid_imdb_link_note'
? 'error.invalid_imdb_link_note'
: data.code === 2
? 'torrent_group_exists_note'
: 'imdb_unknown_error',
? 'error.torrent_group_exists_note'
: 'error.imdb_unknown_error',
data.code === 2 ? [data.error.GroupID] : []
)
return
+6 -6
View File
@@ -60,15 +60,15 @@ globalapp.uploadAddArtistField = function AddArtistField(movie = false) {
ImportanceField.id = 'importance_' + ArtistCount
ImportanceField.name = 'importance[]'
ImportanceField.options[0] = new Option(translation.get('director'), '1')
ImportanceField.options[1] = new Option(translation.get('writer'), '2')
ImportanceField.options[2] = new Option(translation.get('producer'), '3')
ImportanceField.options[3] = new Option(translation.get('composer'), '4')
ImportanceField.options[0] = new Option(lang.get('common.director'), '1')
ImportanceField.options[1] = new Option(lang.get('common.writer'), '2')
ImportanceField.options[2] = new Option(lang.get('common.producer'), '3')
ImportanceField.options[3] = new Option(lang.get('common.composer'), '4')
ImportanceField.options[4] = new Option(
translation.get('cinematographer'),
lang.get('common.cinematographer'),
'5'
)
ImportanceField.options[5] = new Option(translation.get('actor'), '6')
ImportanceField.options[5] = new Option(lang.get('common.actor'), '6')
var x = $('#artistfields').raw()
const div = document.createElement('div')
+4 -4
View File
@@ -1,5 +1,5 @@
import Pristine from '#/forked/pristine'
import Videoinfo from '#/modules/Videoinfo'
import Pristine from '#/js/forked/pristine'
import Videoinfo from '#/js/modules/Videoinfo'
const SOURCE_HAS_NO_PROCESSING = ['', 'TV', 'HDTV', 'WEB']
const DVD = ['DVD']
@@ -319,14 +319,14 @@ function createValidator({ validator }) {
return {
addValidator({ selector, validate, messageKey }) {
const inputs = Array.from(form.querySelectorAll(selector))
const message = translation.get(messageKey)
const message = lang.get(messageKey)
for (const input of inputs) {
validator.addValidator(input, validate, message)
}
},
addValidatorSelectInput({ selector, validate, messageKey }) {
const message = translation.get(messageKey)
const message = lang.get(messageKey)
const select = form.querySelector(selector)
if (!select) {
return
+1 -1
View File
@@ -4,7 +4,7 @@
dnd.js
*/
import sortable from '#/modules/Sortable'
import sortable from '#/js/modules/Sortable'
sortable({
onDragEnd: () => {
+46 -51
View File
@@ -1,50 +1,37 @@
---
a_main_artist_is_required: A "Main" artist is required
actor: Actor
add_torrent_description: Add Torrent Description
are_you_sure_cannot_undone: Are you sure you wish to do this? This cannot be undone!
are_you_sure_you_want_to_cancel: Are you sure you want to cancel?
are_you_sure_you_wish_to_delete_this_post: Are you sure you wish to delete this post?
bbcode:
edit: Edit
loading: Loading...
preview: Preview
check_all: Check all
cinematographer: Cinematographer
clear: Clear
collapse_this_group: Collapse this group. Hold [Command] <em>(Mac)</em> or [Ctrl] <em>(PC)</em> while clicking to collapse all groups {0}
composer: Composer
confirm_purchase: Are you sure you want to purchase {0}?
confirm_username: 'Enter username to give tokens to:'
copied: Copied
director: Director
expand_this_group: Expand this group. Hold [Command] <em>(Mac)</em> or [Ctrl] <em>(PC)</em> while clicking to expand all groups {0}
hide: Hide
imdb_unknown_error: Unknown error, please contact staff.
in_this_release_type: in this release type.
invalid_imdb_link_note: Please enter a valid IMDb link like "tt1234567" or "https://www.imdb.com/title/tt1234567".
like: Like
main: Main
on_this_page: on this page.
please_enter_a_valid_credit_card_number: Please enter a valid credit card number.
please_enter_a_valid_date: Please enter a valid date.
please_enter_a_valid_date_iso: Please enter a valid date (ISO).
please_enter_a_valid_date_number: Please enter a valid number.
please_enter_a_valid_email_address: Please enter a valid email address.
please_enter_a_valid_url: Please enter a valid URL.
please_enter_a_value_between_x_and_y: Please enter a value between {0} and {1}.
please_enter_a_value_between_x_and_y_characters_long: Please enter a value between {0} and {1} characters long.
please_enter_a_value_greater_than_or_equal_to_n: Please enter a value greater than or equal to {0}.
please_enter_a_value_less_than_or_equal_to_n: Please enter a value less than or equal to {0}.
please_enter_at_least_n_characters: Please enter at least {0} characters.
please_enter_no_more_than_n_characters: Please enter no more than {0} characters.
please_enter_only_digits: Please enter only digits.
please_enter_the_same_value_again: Please enter the same value again.
please_fix_this_field: Please fix this field.
pm_user_on_edit: <span id="pmbox{0}"><label>PM user on edit? <input type="checkbox" name="pm" value="1" /></label></span>
producer: Producer
request_has_been_unresolved: The request has been un-resolved. Please refresh your browser to see it.
request_torrent_group_exists_note: The movie already <a href='/torrents.php?id={0}'>exists</a> on the site. Please make sure the format you request does not exist and use the [Request format] link to request your expect format for the movie.
common:
actor: Actor
are_you_sure_cannot_undone: Are you sure you wish to do this? This cannot be undone!
are_you_sure_you_want_to_cancel: Are you sure you want to cancel?
are_you_sure_you_wish_to_delete_this_post: Are you sure you wish to delete this post?
check_all: Check all
cinematographer: Cinematographer
collapse_this_group: Collapse this group. Hold [Command] <em>(Mac)</em> or [Ctrl] <em>(PC)</em> while clicking to collapse all groups {0}
composer: Composer
confirm_purchase: Are you sure you want to purchase {0}?
confirm_username: 'Enter username to give tokens to:'
copied: Copied
director: Director
expand_this_group: Expand this group. Hold [Command] <em>(Mac)</em> or [Ctrl] <em>(PC)</em> while clicking to expand all groups {0}
hide: Hide
in_this_release_type: in this release type.
like: Like
on_this_page: on this page.
pm_user_on_edit: <span id="pmbox{0}"><label>PM user on edit? <input type="checkbox" name="pm" value="1" /></label></span>
producer: Producer
request_has_been_unresolved: The request has been un-resolved. Please refresh your browser to see it.
uncheck_all: Uncheck all
view: View
writer: Writer
error:
imdb_unknown_error: Unknown error, please contact staff.
invalid_imdb_link_note: Please enter a valid IMDb link like "tt1234567" or "https://www.imdb.com/title/tt1234567".
request_torrent_group_exists_note: The movie already <a href='/torrents.php?id={0}'>exists</a> on the site. Please make sure the format you request does not exist and use the [Request format] link to request your expect format for the movie.
torrent_group_exists_note: The movie already <a href='/torrents.php?id={0}'>exists</a> on the site. Please make sure that you're not uploading a duplicate and use the [Add format] link to upload a new format for the movie.
screenshot_comparison:
gpw_helper_not_installed: Please install <a href="https://greasyfork.org/scripts/445653-gpw-helper/code/GPW-Helper.user.js" target="_blank">GPW Helper</a> and reload the page
help: Press ? to read help
@@ -60,7 +47,6 @@ screenshot_comparison:
loading: Loading...
pixel_compare: Pixel Compare
solar_curve: Solar Curve
show: Show
staffpm:
assign_assigned: Conversation successfully assigned.
error: Something went wrong.
@@ -71,12 +57,9 @@ stats:
torrentByDay: Torrent Daily Uploads
torrentByMonth: Torrent Monthly Uploads
torrentByYear: Torrent Yearly Uploads
this_field_is_required: This field is required.
torrent_group_exists_note: The movie already <a href='/torrents.php?id={0}'>exists</a> on the site. Please make sure that you're not uploading a duplicate and use the [Add format] link to upload a new format for the movie.
torrent_table:
collapse_edition: Collapse this resolution group. Hold [Command] <em>(Mac)</em> or [Ctrl] <em>(PC)</em> while clicking to collapse all resolutions in this torrent group.
expand_edition: Expand this resolution group. Hold [Command] <em>(Mac)</em> or [Ctrl] <em>(PC)</em> while clicking to expand all resolutions in this torrent group.
uncheck_all: Uncheck all
upload:
codec_required: Please select a codec.
container_required: Please select a container.
@@ -100,8 +83,20 @@ upload:
tag_required: Please specify at least one genre!
torrent_file_required: Please select a torrent file!
year_required: Please specify the year of the original release!
view: View
warning_subtitle_file: Please select subtitle file!
warning_subtitle_format: Please select subtitle format!
warning_subtitle_language: Please select subtitle langauge!
writer: Writer
validation:
please_enter_a_valid_credit_card_number: Please enter a valid credit card number.
please_enter_a_valid_date: Please enter a valid date.
please_enter_a_valid_date_iso: Please enter a valid date (ISO).
please_enter_a_valid_date_number: Please enter a valid number.
please_enter_a_valid_email_address: Please enter a valid email address.
please_enter_a_valid_url: Please enter a valid URL.
please_enter_a_value_between_x_and_y: Please enter a value between {0} and {1}.
please_enter_a_value_between_x_and_y_characters_long: Please enter a value between {0} and {1} characters long.
please_enter_a_value_greater_than_or_equal_to_n: Please enter a value greater than or equal to {0}.
please_enter_a_value_less_than_or_equal_to_n: Please enter a value less than or equal to {0}.
please_enter_at_least_n_characters: Please enter at least {0} characters.
please_enter_no_more_than_n_characters: Please enter no more than {0} characters.
please_enter_only_digits: Please enter only digits.
please_enter_the_same_value_again: Please enter the same value again.
please_fix_this_field: Please fix this field.
this_field_is_required: This field is required.
@@ -1,50 +1,37 @@
---
a_main_artist_is_required: 至少要有一个主要艺人
actor: 演员
add_torrent_description: 添加种子描述
are_you_sure_cannot_undone: 你确定要这样操作吗?该操作不可撤销!
are_you_sure_you_want_to_cancel: 你确定要取消吗?
are_you_sure_you_wish_to_delete_this_post: 你确定要删除这条回帖吗?
bbcode:
edit: 编辑
loading: 加载中……
preview: 预览
check_all: 全选
cinematographer: 摄影
clear: 清除
collapse_this_group: 折叠本影片。在左键单击的同时按住 [Command] <em>(Mac)</em> 或 [Ctrl] <em>(PC)</em> 键以折叠{0}所有的影片。
composer: 作曲
confirm_purchase: 你确定要购买 {0}吗?
confirm_username: '请输入受赠者的用户名:'
copied: 已复制
director: 导演
expand_this_group: 展开本影片。在左键单击的同时按住 [Command] <em>(Mac)</em> 或 [Ctrl] <em>(PC)</em> 键以展开{0}所有的影片。
hide: 隐藏
imdb_unknown_error: 请检查 IMDb ID 是否填写有误,如果无误,请重试,重试无效,请联系管理员。
in_this_release_type: 本发布类型
invalid_imdb_link_note: 请填入格式合规的 IMDb 链接,形如 “tt1234567” 或 “https://www.imdb.com/title/tt1234567”
like:
main: 主要
on_this_page: 本页面
please_enter_a_valid_credit_card_number: 请输入一个有效的信用卡号。
please_enter_a_valid_date: 请输入一个有效的日期。
please_enter_a_valid_date_iso: 请输入一个有效的日期(ISO)。
please_enter_a_valid_date_number: 输入一个有效的数字
please_enter_a_valid_email_address: 请输入一个有效的邮箱地址。
please_enter_a_valid_url: 请输入一个有效的网址。
please_enter_a_value_between_x_and_y: 请输入一个介于 {0} 到 {1} 之间的值。
please_enter_a_value_between_x_and_y_characters_long: 请输入一个介于 {0} 到 {1} 字符长度之间的值。
please_enter_a_value_greater_than_or_equal_to_n: 输入一个大于等于 {0} 的值
please_enter_a_value_less_than_or_equal_to_n: 输入一个小于等于 {0} 的值
please_enter_at_least_n_characters: 请输入至少 {0} 个字符
please_enter_no_more_than_n_characters: 请输入不超过 {0} 个字符
please_enter_only_digits: 请输入纯数字。
please_enter_the_same_value_again: 请重复输入一遍。
please_fix_this_field: 请修正此栏。
pm_user_on_edit: <span id="pmbox{0}"><label>编辑后私信通知发帖人?<input type="checkbox" name="pm" value="1" /></label></span>
producer: 制片
request_has_been_unresolved: 请求已被归入未处理类别。请刷新浏览器查看。
request_torrent_group_exists_note: 站点已有此电影,<a href='/torrents.php?id={0}'>点此</a> 查看并确保你想要的格式不存在,通过页面上方的 “请求格式” 发布求种。
common:
actor: 演员
are_you_sure_cannot_undone: 你确定要这样操作吗?该操作不可撤销!
are_you_sure_you_want_to_cancel: 你确定要取消吗?
are_you_sure_you_wish_to_delete_this_post: 你确定要删除这条回帖吗?
check_all: 全选
cinematographer: 摄影
collapse_this_group: 折叠本影片。在左键单击的同时按住 [Command] <em>(Mac)</em> 或 [Ctrl] <em>(PC)</em> 键以折叠{0}所有的影片。
composer: 作曲
confirm_purchase: 你确定要购买 {0}吗?
confirm_username: '请输入受赠者的用户名:'
copied: 已复制
director: 导演
expand_this_group: 展开本影片。在左键单击的同时按住 [Command] <em>(Mac)</em> 或 [Ctrl] <em>(PC)</em> 键以展开{0}所有的影片
hide: 隐藏
in_this_release_type: 本发布类型
like:
on_this_page: 本页面
pm_user_on_edit: <span id="pmbox{0}"><label>编辑后私信通知发帖人?<input type="checkbox" name="pm" value="1" /></label></span>
producer: 制片
request_has_been_unresolved: 求已被归入未处理类别。请刷新浏览器查看
uncheck_all: 取消全选
view: 查看
writer: 编剧
error:
imdb_unknown_error: 检查 IMDb ID 是否填写有误,如果无误,请重试,重试无效,请联系管理员
invalid_imdb_link_note: 填入格式合规的 IMDb 链接,形如 “tt1234567” 或 “https://www.imdb.com/title/tt1234567”
request_torrent_group_exists_note: 站点已有此电影,<a href='/torrents.php?id={0}'>点此</a> 查看并确保你想要的格式不存在,通过页面上方的 “请求格式” 发布求种
torrent_group_exists_note: 站点已有此电影,<a href='/torrents.php?id={0}'>点此</a> 查看并确保你想要发布的种子不与既有种子重复后,通过页面上方的 “添加格式” 发布
screenshot_comparison:
gpw_helper_not_installed: 请先安装 <a href="https://greasyfork.org/scripts/445653-gpw-helper/code/GPW-Helper.user.js" target="_blank">GPW 助手</a>, 然后重新加载此页面
help: 按 ? 键查看帮助文档
@@ -60,7 +47,6 @@ screenshot_comparison:
loading: 加载中……
pixel_compare: 像素对比
solar_curve: 曲线滤镜
show: 显示
staffpm:
assign_assigned: 成功指定对话
error: 系统出错了
@@ -71,12 +57,9 @@ stats:
torrentByDay: 每日发种数
torrentByMonth: 每月发种数
torrentByYear: 每年发种数
this_field_is_required: 此栏必填。
torrent_group_exists_note: 站点已有此电影,<a href='/torrents.php?id={0}'>点此</a> 查看并确保你想要发布的种子不与既有种子重复后,通过页面上方的 “添加格式” 发布。
torrent_table:
collapse_edition: 折叠本清晰度组。在左键单击的同时按住 [Command] <em>(Mac)</em> 或 [Ctrl] <em>(PC)</em> 键以折叠本影片中所有的清晰度组。
expand_edition: 展开本清晰度组。在左键单击的同时按住 [Command] <em>(Mac)</em> 或 [Ctrl] <em>(PC)</em> 键以展开本影片中所有的清晰度组。
uncheck_all: 取消全选
upload:
codec_required: 请选择一个编码。
container_required: 请选择一个容器。
@@ -100,8 +83,20 @@ upload:
tag_required: 请填写至少一个类型标签!
torrent_file_required: 请选中一个种子文件!
year_required: 请填写电影首次公映的年份!
view: 查看
warning_subtitle_file: 选中一个字幕文件!
warning_subtitle_format: 使用站点规则允许的字幕格式!
warning_subtitle_language: 指定字幕的语言!
writer: 编剧
validataion:
please_enter_a_valid_credit_card_number: 输入一个有效的信用卡号。
please_enter_a_valid_date: 输入一个有效的日期。
please_enter_a_valid_date_iso: 输入一个有效的日期(ISO)。
please_enter_a_valid_date_number: 请输入一个有效的数字。
please_enter_a_valid_email_address: 请输入一个有效的邮箱地址。
please_enter_a_valid_url: 请输入一个有效的网址。
please_enter_a_value_between_x_and_y: 请输入一个介于 {0} 到 {1} 之间的值。
please_enter_a_value_between_x_and_y_characters_long: 请输入一个介于 {0} 到 {1} 字符长度之间的值。
please_enter_a_value_greater_than_or_equal_to_n: 请输入一个大于等于 {0} 的值。
please_enter_a_value_less_than_or_equal_to_n: 请输入一个小于等于 {0} 的值。
please_enter_at_least_n_characters: 请输入至少 {0} 个字符。
please_enter_no_more_than_n_characters: 请输入不超过 {0} 个字符。
please_enter_only_digits: 请输入纯数字。
please_enter_the_same_value_again: 请重复输入一遍。
please_fix_this_field: 请修正此栏。
this_field_is_required: 此栏必填。