mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-20 21:23:08 +03:00
i18n: extract more strings
This commit is contained in:
1 parent
92bf2b5bd7
commit
4103bd7e6e
7 files changed
+1778
-1803
No files matched your search
+1689
-1720
File diff suppressed because it is too large.
Load diff
@@ -141,7 +141,7 @@ async function onUpload(file: File) {
|
||||
|
||||
<n-space justify="center" mb-1>
|
||||
<n-checkbox v-model:checked="includeDataUri">
|
||||
Include data: URI prefix
|
||||
{{ $t('tools.base64-file-converter.texts.include-data-uri-prefix') }}
|
||||
</n-checkbox>
|
||||
</n-space>
|
||||
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useITStorage } from '@/composable/queryParams';
|
||||
import { Base64 } from 'js-base64';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const url = ref('');
|
||||
const html = ref('');
|
||||
const error = ref('');
|
||||
@@ -26,12 +29,12 @@ const options = useITStorage('html-to-pdf:opts', {
|
||||
});
|
||||
|
||||
const pdfFormats = [
|
||||
{ label: 'A2', value: 'A2' },
|
||||
{ label: 'A3', value: 'A3' },
|
||||
{ label: 'A4', value: 'A4' },
|
||||
{ label: 'A5', value: 'A5' },
|
||||
{ label: 'Letter', value: 'Letter' },
|
||||
{ label: 'Legal', value: 'Legal' },
|
||||
{ label: t('tools.html-to-pdf.texts.label-a2'), value: 'A2' },
|
||||
{ label: t('tools.html-to-pdf.texts.label-a3'), value: 'A3' },
|
||||
{ label: t('tools.html-to-pdf.texts.label-a4'), value: 'A4' },
|
||||
{ label: t('tools.html-to-pdf.texts.label-a5'), value: 'A5' },
|
||||
{ label: t('tools.html-to-pdf.texts.label-letter'), value: 'Letter' },
|
||||
{ label: t('tools.html-to-pdf.texts.label-legal'), value: 'Legal' },
|
||||
];
|
||||
|
||||
function downloadURL(data: string, fileName: string) {
|
||||
@@ -186,28 +189,27 @@ async function generateBatch() {
|
||||
<template>
|
||||
<div>
|
||||
<details mb-2>
|
||||
<summary>HTML to PDF Service Configuration (self hosted)</summary>
|
||||
<summary>{{ t('tools.html-to-pdf.texts.tag-html-to-pdf-service-configuration-self-hosted') }}</summary>
|
||||
<n-card>
|
||||
<NFormItem label="HTML to PDF Service Url:" label-placement="top">
|
||||
<NInput v-model:value="serverHost" placeholder="http://localhost:3000" />
|
||||
<NFormItem :label="t('tools.html-to-pdf.texts.label-html-to-pdf-service-url')" label-placement="top">
|
||||
<NInput v-model:value="serverHost" :placeholder="t('tools.html-to-pdf.texts.placeholder-http-localhost-3000')" />
|
||||
</NFormItem>
|
||||
<NFormItem label="Basic Authentication:" label-placement="left" label-width="auto">
|
||||
<NInput v-model:value="serverAuth" placeholder="username:password" />
|
||||
<NFormItem :label="t('tools.html-to-pdf.texts.label-basic-authentication')" label-placement="left" label-width="auto">
|
||||
<NInput v-model:value="serverAuth" :placeholder="t('tools.html-to-pdf.texts.placeholder-username-password')" />
|
||||
</NFormItem>
|
||||
<n-p>
|
||||
You must self host HTML to PDF Service. See:
|
||||
<c-link href="https://github.com/sharevb/puppeteer-htmltopdf?tab=readme-ov-file#running-in-docker" target="_blank">
|
||||
HTML to PDF Service install
|
||||
{{ t('tools.html-to-pdf.texts.tag-you-must-self-host-html-to-pdf-service-see') }}<c-link href="https://github.com/sharevb/puppeteer-htmltopdf?tab=readme-ov-file#running-in-docker" target="_blank">
|
||||
{{ t('tools.html-to-pdf.texts.tag-html-to-pdf-service-install') }}
|
||||
</c-link>
|
||||
</n-p>
|
||||
</n-card>
|
||||
</details>
|
||||
|
||||
<NTabs type="line">
|
||||
<NTabPane name="url" tab="URL → PDF">
|
||||
<NTabPane name="url" :tab="t('tools.html-to-pdf.texts.tab-url-pdf')">
|
||||
<NForm label-placement="left">
|
||||
<NFormItem label="URL:">
|
||||
<NInput v-model:value="url" placeholder="https://example.com" />
|
||||
<NFormItem :label="t('tools.html-to-pdf.texts.label-url')">
|
||||
<NInput v-model:value="url" :placeholder="t('tools.html-to-pdf.texts.placeholder-https-example-com')" />
|
||||
</NFormItem>
|
||||
|
||||
<n-space mb-2 justify="center">
|
||||
@@ -217,7 +219,7 @@ async function generateBatch() {
|
||||
:disabled="isRunning"
|
||||
@click="generateFromUrl"
|
||||
>
|
||||
Generate PDF
|
||||
{{ t('tools.html-to-pdf.texts.tag-generate-pdf') }}
|
||||
</NButton>
|
||||
</n-space>
|
||||
|
||||
@@ -227,9 +229,9 @@ async function generateBatch() {
|
||||
</NForm>
|
||||
</NTabPane>
|
||||
|
||||
<NTabPane name="html" tab="HTML → PDF">
|
||||
<NTabPane name="html" :tab="t('tools.html-to-pdf.texts.tab-html-pdf')">
|
||||
<NForm label-placement="top">
|
||||
<NFormItem label="HTML Content:">
|
||||
<NFormItem :label="t('tools.html-to-pdf.texts.label-html-content')">
|
||||
<NInput
|
||||
v-model:value="html"
|
||||
type="textarea"
|
||||
@@ -244,7 +246,7 @@ async function generateBatch() {
|
||||
:disabled="isRunning"
|
||||
@click="generateFromHtml"
|
||||
>
|
||||
Generate PDF
|
||||
{{ t('tools.html-to-pdf.texts.tag-generate-pdf') }}
|
||||
</NButton>
|
||||
</n-space>
|
||||
|
||||
@@ -254,9 +256,9 @@ async function generateBatch() {
|
||||
</NForm>
|
||||
</NTabPane>
|
||||
|
||||
<NTabPane name="batch" tab="Batch URL → PDF">
|
||||
<NTabPane name="batch" :tab="t('tools.html-to-pdf.texts.tab-batch-url-pdf')">
|
||||
<NForm label-placement="top">
|
||||
<NFormItem label="URLs (one per line):">
|
||||
<NFormItem :label="t('tools.html-to-pdf.texts.label-urls-one-per-line')">
|
||||
<NInput
|
||||
v-model:value="batchUrls"
|
||||
type="textarea"
|
||||
@@ -271,7 +273,7 @@ async function generateBatch() {
|
||||
:disabled="isBatchRunning"
|
||||
@click="generateBatch"
|
||||
>
|
||||
Generate PDFs
|
||||
{{ t('tools.html-to-pdf.texts.tag-generate-pdfs') }}
|
||||
</NButton>
|
||||
</n-space>
|
||||
</NForm>
|
||||
@@ -289,11 +291,11 @@ async function generateBatch() {
|
||||
</div>
|
||||
|
||||
<!-- Results -->
|
||||
<NCard v-if="batchResults.length > 0" title="Results">
|
||||
<NCard v-if="batchResults.length > 0" :title="t('tools.html-to-pdf.texts.title-results')">
|
||||
<n-table>
|
||||
<thead>
|
||||
<th>Url</th>
|
||||
<th>Download</th>
|
||||
<th>{{ t('tools.html-to-pdf.texts.tag-url') }}</th>
|
||||
<th>{{ t('tools.html-to-pdf.texts.tag-download') }}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr
|
||||
@@ -311,13 +313,13 @@ async function generateBatch() {
|
||||
type="success"
|
||||
@click="downloadBlob(item.pdfBlob!, `${urlToFilename(item.url)}.pdf`)"
|
||||
>
|
||||
Download PDF
|
||||
{{ t('tools.html-to-pdf.texts.tag-download-pdf') }}
|
||||
</NButton>
|
||||
</template>
|
||||
|
||||
<template v-else>
|
||||
<NButton size="small" type="error" disabled>
|
||||
Failed
|
||||
{{ t('tools.html-to-pdf.texts.tag-failed') }}
|
||||
</NButton>
|
||||
<div style="color: red; font-size: 12px">
|
||||
{{ item.error }}
|
||||
@@ -331,52 +333,52 @@ async function generateBatch() {
|
||||
</NTabPane>
|
||||
|
||||
<!-- Custom PDF Options -->
|
||||
<NTabPane name="custom-options" tab="Custom PDF Options">
|
||||
<NTabPane name="custom-options" :tab="t('tools.html-to-pdf.texts.tab-custom-pdf-options')">
|
||||
<NForm label-placement="left">
|
||||
<NFormItem label="Format:">
|
||||
<NFormItem :label="t('tools.html-to-pdf.texts.label-format')">
|
||||
<NSelect
|
||||
v-model:value="options.format"
|
||||
:options="pdfFormats"
|
||||
/>
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Language:">
|
||||
<NInput v-model:value="options.language" placeholder="en-US" />
|
||||
<NFormItem :label="t('tools.html-to-pdf.texts.label-language')">
|
||||
<NInput v-model:value="options.language" :placeholder="t('tools.html-to-pdf.texts.placeholder-en-us')" />
|
||||
</NFormItem>
|
||||
|
||||
<n-space justify="center">
|
||||
<NFormItem label="Landscape:">
|
||||
<NFormItem :label="t('tools.html-to-pdf.texts.label-landscape')">
|
||||
<NSwitch v-model:value="options.landscape" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="One Long Page:">
|
||||
<NFormItem :label="t('tools.html-to-pdf.texts.label-one-long-page')">
|
||||
<NSwitch v-model:value="options.onePage" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Auto-Hide Cookie Banners:">
|
||||
<NFormItem :label="t('tools.html-to-pdf.texts.label-auto-hide-cookie-banners')">
|
||||
<NSwitch v-model:value="options.autoHideCookies" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Print Background:">
|
||||
<NFormItem :label="t('tools.html-to-pdf.texts.label-print-background')">
|
||||
<NSwitch v-model:value="options.printBackground" />
|
||||
</NFormItem>
|
||||
</n-space>
|
||||
|
||||
<c-card title="Margins">
|
||||
<c-card :title="t('tools.html-to-pdf.texts.title-margins')">
|
||||
<NSpace justify="center">
|
||||
<NFormItem label="Top (mm):" style="width: 200px">
|
||||
<NFormItem :label="t('tools.html-to-pdf.texts.label-top-mm')" style="width: 200px">
|
||||
<NInputNumber v-model:value="options.margin.top" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Bottom (mm):" style="width: 200px">
|
||||
<NFormItem :label="t('tools.html-to-pdf.texts.label-bottom-mm')" style="width: 200px">
|
||||
<NInputNumber v-model:value="options.margin.bottom" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Left (mm):" style="width: 200px">
|
||||
<NFormItem :label="t('tools.html-to-pdf.texts.label-left-mm')" style="width: 200px">
|
||||
<NInputNumber v-model:value="options.margin.left" />
|
||||
</NFormItem>
|
||||
|
||||
<NFormItem label="Right (mm):" style="width: 200px">
|
||||
<NFormItem :label="t('tools.html-to-pdf.texts.label-right-mm')" style="width: 200px">
|
||||
<NInputNumber v-model:value="options.margin.right" />
|
||||
</NFormItem>
|
||||
</NSpace>
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
import { Printer } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'HTML to PDF',
|
||||
name: t('tools.html-to-pdf.title'),
|
||||
path: '/html-to-pdf',
|
||||
description: 'Generate PDF from HTML content or URL with format selection and auto hide cookie banners',
|
||||
description: t('tools.html-to-pdf.description'),
|
||||
keywords: ['html', 'url', 'pdf'],
|
||||
component: () => import('./html-to-pdf.vue'),
|
||||
icon: Printer,
|
||||
createdAt: new Date('2026-04-07'),
|
||||
category: 'PDF',
|
||||
externAccessDescription: 'This tool sends URLs and HTML content to the *self hosted* Puppeteer webservice configured.',
|
||||
externAccessDescription: t('tools.html-to-pdf.externalAccess'),
|
||||
});
|
||||
@@ -1,10 +1,11 @@
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
import { SunOff } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Shutdown Command Generator',
|
||||
name: t('tools.shutdown-command-generator.title'),
|
||||
path: '/shutdown-command-generator',
|
||||
description: 'Generate shutdown command for various OS',
|
||||
description: t('tools.shutdown-command-generator.description'),
|
||||
keywords: ['shutdown', 'command'],
|
||||
component: () => import('./shutdown-command-generator.vue'),
|
||||
icon: SunOff,
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const { t } = useI18n();
|
||||
type Platform = 'windows' | 'linux' | 'macos';
|
||||
type Mode = 'delay' | 'time';
|
||||
|
||||
@@ -22,14 +25,14 @@ const cancel = ref(false);
|
||||
const hibernate = ref(false);
|
||||
|
||||
const platformOptions = [
|
||||
{ label: 'Windows', value: 'windows' },
|
||||
{ label: 'Linux', value: 'linux' },
|
||||
{ label: 'macOS', value: 'macos' },
|
||||
{ label: t('tools.shutdown-command-generator.texts.label-windows'), value: 'windows' },
|
||||
{ label: t('tools.shutdown-command-generator.texts.label-linux'), value: 'linux' },
|
||||
{ label: t('tools.shutdown-command-generator.texts.label-macos'), value: 'macos' },
|
||||
];
|
||||
|
||||
const modeOptions = [
|
||||
{ label: 'Delay', value: 'delay' },
|
||||
{ label: 'Specific Time', value: 'time' },
|
||||
{ label: t('tools.shutdown-command-generator.texts.label-delay'), value: 'delay' },
|
||||
{ label: t('tools.shutdown-command-generator.texts.label-specific-time'), value: 'time' },
|
||||
];
|
||||
|
||||
// --- Command Builders -------------------------------------------------------
|
||||
@@ -167,7 +170,7 @@ const command = computed(() => {
|
||||
<c-select
|
||||
v-model:value="platform"
|
||||
:options="platformOptions"
|
||||
label="Platform:"
|
||||
:label="t('tools.shutdown-command-generator.texts.label-platform')"
|
||||
label-position="left"
|
||||
mb-1
|
||||
/>
|
||||
@@ -185,27 +188,22 @@ const command = computed(() => {
|
||||
</NSpace>
|
||||
|
||||
<NSpace v-if="mode === 'delay'" justify="center" mb-1>
|
||||
<NFormItem label="Delay:" label-placement="left" mb-1>
|
||||
<NFormItem :label="t('tools.shutdown-command-generator.texts.label-delay')" label-placement="left" mb-1>
|
||||
<NInputNumber
|
||||
v-model:value="delayHours"
|
||||
:min="0"
|
||||
/>
|
||||
h
|
||||
<NInputNumber
|
||||
/>{{ t('tools.shutdown-command-generator.texts.tag-nbsp-h-nbsp') }}<NInputNumber
|
||||
v-model:value="delayMinutes"
|
||||
:min="0"
|
||||
/>
|
||||
m
|
||||
<NInputNumber
|
||||
/>{{ t('tools.shutdown-command-generator.texts.tag-nbsp-m-nbsp') }}<NInputNumber
|
||||
v-model:value="delaySeconds"
|
||||
:min="0"
|
||||
/>
|
||||
s
|
||||
/>{{ t('tools.shutdown-command-generator.texts.tag-nbsp-s') }}
|
||||
</NFormItem>
|
||||
</NSpace>
|
||||
|
||||
<NSpace v-if="mode === 'time'" justify="center" mb-1>
|
||||
<NFormItem label="Shutdown time:" label-placement="left">
|
||||
<NFormItem :label="t('tools.shutdown-command-generator.texts.label-shutdown-time')" label-placement="left">
|
||||
<NDatePicker
|
||||
v-model:value="timeValue"
|
||||
type="datetime"
|
||||
@@ -214,14 +212,14 @@ const command = computed(() => {
|
||||
</NSpace>
|
||||
|
||||
<NSpace justify="center" mb-1>
|
||||
<NCheckbox v-model:checked="force" label="Force" />
|
||||
<NCheckbox v-model:checked="reboot" label="Reboot" />
|
||||
<NCheckbox v-model:checked="logoff" label="Logoff" />
|
||||
<NCheckbox v-model:checked="cancel" label="Cancel" />
|
||||
<NCheckbox v-model:checked="hibernate" label="Hibernate" />
|
||||
<NCheckbox v-model:checked="force" :label="t('tools.shutdown-command-generator.texts.label-force')" />
|
||||
<NCheckbox v-model:checked="reboot" :label="t('tools.shutdown-command-generator.texts.label-reboot')" />
|
||||
<NCheckbox v-model:checked="logoff" :label="t('tools.shutdown-command-generator.texts.label-logoff')" />
|
||||
<NCheckbox v-model:checked="cancel" :label="t('tools.shutdown-command-generator.texts.label-cancel')" />
|
||||
<NCheckbox v-model:checked="hibernate" :label="t('tools.shutdown-command-generator.texts.label-hibernate')" />
|
||||
</NSpace>
|
||||
|
||||
<c-card title="Generated command">
|
||||
<c-card :title="t('tools.shutdown-command-generator.texts.title-generated-command')">
|
||||
<textarea-copyable :value="command" language="bash" />
|
||||
</c-card>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const billAmount = ref<number>();
|
||||
const tipPercentage = ref<number>(15);
|
||||
const numberOfPeople = ref<number>(1);
|
||||
@@ -35,33 +39,33 @@ const amountPerPersonFormatted = computed(() => formatCurrency(amountPerPerson.v
|
||||
|
||||
<template>
|
||||
<div style="margin: 0 auto; max-width: 600px">
|
||||
<c-card mb-3 title="Bill Details">
|
||||
<c-card mb-3 :title="t('tools.tip-calculator.texts.title-bill-details')">
|
||||
<n-form label-placement="left" label-width="150px" label-align="left">
|
||||
<n-form-item label="Bill Amount:">
|
||||
<n-input-number v-model:value="billAmount" :min="0" placeholder="Total Bill" />
|
||||
<n-form-item :label="t('tools.tip-calculator.texts.label-bill-amount')">
|
||||
<n-input-number v-model:value="billAmount" :min="0" :placeholder="t('tools.tip-calculator.texts.placeholder-total-bill')" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Tip Percentage:">
|
||||
<n-input-number v-model:value="tipPercentage" :min="0" placeholder="Tip %">
|
||||
<n-form-item :label="t('tools.tip-calculator.texts.label-tip-percentage')">
|
||||
<n-input-number v-model:value="tipPercentage" :min="0" :placeholder="t('tools.tip-calculator.texts.placeholder-tip')">
|
||||
<template #suffix>
|
||||
%
|
||||
{{ t('tools.tip-calculator.texts.tag-') }}
|
||||
</template>
|
||||
</n-input-number>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="Number of person:">
|
||||
<n-input-number v-model:value="numberOfPeople" :min="1" placeholder="People" />
|
||||
<n-form-item :label="t('tools.tip-calculator.texts.label-number-of-person')">
|
||||
<n-input-number v-model:value="numberOfPeople" :min="1" :placeholder="t('tools.tip-calculator.texts.placeholder-people')" />
|
||||
</n-form-item>
|
||||
</n-form>
|
||||
</c-card>
|
||||
|
||||
<c-card mb-3 title="Results">
|
||||
<input-copyable label="Tip Amount:" :value="tipAmountFormatted" readonly label-position="left" label-width="150px" mb-1 />
|
||||
<input-copyable label="Total Bill:" :value="totalAmountFormatted" readonly label-position="left" label-width="150px" mb-1 />
|
||||
<input-copyable label="Amount Per Person:" :value="amountPerPersonFormatted" readonly label-position="left" label-width="150px" mb-1 />
|
||||
<c-card mb-3 :title="t('tools.tip-calculator.texts.title-results')">
|
||||
<input-copyable :label="t('tools.tip-calculator.texts.label-tip-amount')" :value="tipAmountFormatted" readonly label-position="left" label-width="150px" mb-1 />
|
||||
<input-copyable :label="t('tools.tip-calculator.texts.label-total-bill')" :value="totalAmountFormatted" readonly label-position="left" label-width="150px" mb-1 />
|
||||
<input-copyable :label="t('tools.tip-calculator.texts.label-amount-per-person')" :value="amountPerPersonFormatted" readonly label-position="left" label-width="150px" mb-1 />
|
||||
</c-card>
|
||||
|
||||
<c-card title="Quick Tip %">
|
||||
<c-card :title="t('tools.tip-calculator.texts.title-quick-tip')">
|
||||
<n-space justify="center">
|
||||
<n-button v-for="tip in [10, 15, 18, 20, 25]" :key="tip" size="small" @click="tipPercentage = tip">
|
||||
{{ tip }}%
|
||||
|
||||
Reference in new issue
Block a user