view release on metacpan or search on metacpan
**gpt-4o**'s interface is unstable and cannot be guaranteed to work
correctly at the moment.
- **gpt5**: gpt-5.5
- **--xlate-labor**
- **--xlabor**
Instead of calling translation engine, you are expected to work for.
After preparing text to be translated, they are copied to the
clipboard. You are expected to paste them to the form, copy the
result to the clipboard, and hit return.
- **--xlate-to** (Default: `EN-US`)
Specify the target language. You can get available languages by
`deepl languages` command when using **DeepL** engine.
- **--xlate-format**=_format_ (Default: `conflict`)
Specify the output format for original and translated text.
- **xtxt**
If the format is `xtxt` (translated text) or unkown, only translated
text is printed.
- **--xlate-maxlen**=_chars_ (Default: 0)
Specify the maximum length of text to be sent to the API at once.
Default value is set as for free DeepL account service: 128K for the
API (**--xlate**) and 5000 for the clipboard interface
(**--xlate-labor**). You may be able to change these value if you are
using Pro service.
- **--xlate-maxline**=_n_ (Default: 0)
Specify the maximum lines of text to be sent to the API at once.
Set this value to 1 if you want to translate one line at a time. This
option takes precedence over the `--xlate-maxlen` option.
docs/src/xlate.deepl-ID.pod view on Meta::CPAN
Antarmuka B<gpt-4o> tidak stabil dan tidak dapat dijamin untuk bekerja dengan benar saat ini.
=item * B<gpt5>: gpt-5.5
=back
=item B<--xlate-labor>
=item B<--xlabor>
Alih-alih memanggil mesin penerjemah, Anda diharapkan untuk bekerja. Setelah menyiapkan teks yang akan diterjemahkan, teks tersebut disalin ke clipboard. Anda diharapkan untuk menempelkannya ke formulir, menyalin hasilnya ke clipboard, dan menekan re...
=item B<--xlate-to> (Default: C<EN-US>)
Tentukan bahasa target. Anda bisa mendapatkan bahasa yang tersedia dengan perintah C<deepl languages> ketika menggunakan mesin B<DeepL>.
=item B<--xlate-format>=I<format> (Default: C<conflict>)
Tentukan format output untuk teks asli dan terjemahan.
Format berikut ini selain C<xtxt> mengasumsikan bahwa bagian yang akan diterjemahkan adalah kumpulan baris. Pada kenyataannya, dimungkinkan untuk menerjemahkan hanya sebagian dari sebuah baris, tetapi menentukan format selain C<xtxt> tidak akan mengh...
docs/src/xlate.deepl-ID.pod view on Meta::CPAN
Teks asli dan teks yang dikonversi dicetak dipisahkan oleh satu baris kosong. Untuk C<spasi+>, ini juga menghasilkan baris baru setelah teks yang dikonversi.
=item B<xtxt>
Jika formatnya adalah C<xtxt> (teks terjemahan) atau tidak diketahui, hanya teks terjemahan yang dicetak.
=back
=item B<--xlate-maxlen>=I<chars> (Default: 0)
Tentukan panjang maksimum teks yang akan dikirim ke API sekaligus. Nilai default ditetapkan untuk layanan akun DeepL gratis: 128K untuk API (B<--xlate>) dan 5000 untuk antarmuka clipboard (B<--xlate-labor>). Anda mungkin dapat mengubah nilai ini jika...
=item B<--xlate-maxline>=I<n> (Default: 0)
Tentukan jumlah maksimum baris teks yang akan dikirim ke API sekaligus.
Tetapkan nilai ini ke 1 jika Anda ingin menerjemahkan satu baris dalam satu waktu. Opsi ini lebih diutamakan daripada opsi C<--xlate-maxlen>.
=item B<--xlate-prompt>=I<text>
Tentukan prompt khusus yang akan dikirim ke mesin terjemahan. Opsi ini hanya tersedia saat menggunakan mesin ChatGPT (gpt3, gpt4o, gpt5). Anda dapat menyesuaikan perilaku terjemahan dengan memberikan instruksi spesifik kepada model AI. Jika prompt be...
docs/src/xlate.deepl-RO.pod view on Meta::CPAN
InterfaÈa lui B<gpt-4o> este instabilÄ Èi nu se poate garanta cÄ funcÈioneazÄ corect în acest moment.
=item * B<gpt5>: gpt-5.5
=back
=item B<--xlate-labor>
=item B<--xlabor>
Ãn loc sÄ apelaÈi motorul de traducere, se aÈteaptÄ sÄ lucraÈi pentru. DupÄ pregÄtirea textului care urmeazÄ sÄ fie tradus, acestea sunt copiate în clipboard. Se aÈteaptÄ sÄ le lipiÈi în formular, sÄ copiaÈi rezultatul în clipboar...
=item B<--xlate-to> (Default: C<EN-US>)
SpecificaÈi limba ÈintÄ. PuteÈi obÈine limbile disponibile prin comanda C<deepl languages> atunci când se utilizeazÄ motorul B<DeepL>.
=item B<--xlate-format>=I<format> (Default: C<conflict>)
SpecificaÈi formatul de ieÈire pentru textul original Èi cel tradus.
UrmÄtoarele formate, altele decât C<xtxt>, presupun cÄ partea care urmeazÄ sÄ fie tradusÄ este o colecÈie de linii. De fapt, este posibil sÄ se traducÄ doar o parte a unei linii, dar specificarea unui alt format decât C<xtxt> nu va produce ...
docs/src/xlate.deepl-RO.pod view on Meta::CPAN
Textul original Èi cel convertit sunt tipÄrite separate de o singurÄ linie albÄ. Pentru C<space+>, se tipÄreÈte Èi o linie nouÄ dupÄ textul convertit.
=item B<xtxt>
DacÄ formatul este C<xtxt> (text tradus) sau necunoscut, se tipÄreÈte numai textul tradus.
=back
=item B<--xlate-maxlen>=I<chars> (Default: 0)
SpecificaÈi lungimea maximÄ a textului care urmeazÄ sÄ fie trimis la API deodatÄ. Valoarea implicitÄ este setatÄ ca pentru serviciul de cont gratuit DeepL: 128K pentru API (B<--xlate>) Èi 5000 pentru interfaÈa clipboard (B<--xlate-labor>). E...
=item B<--xlate-maxline>=I<n> (Default: 0)
SpecificaÈi numÄrul maxim de linii de text care urmeazÄ sÄ fie trimise simultan cÄtre API.
SetaÈi aceastÄ valoare la 1 dacÄ doriÈi sÄ traduceÈi un rând pe rând. AceastÄ opÈiune are prioritate faÈÄ de opÈiunea C<--xlate-maxlen>.
=item B<--xlate-prompt>=I<text>
SpecificaÈi o solicitare personalizatÄ care sÄ fie trimisÄ motorului de traducere. AceastÄ opÈiune este disponibilÄ numai atunci când se utilizeazÄ motoarele ChatGPT (gpt3, gpt4o, gpt5). PuteÈi personaliza comportamentul traducerii oferind ...
docs/src/xlate.gpt5-RO.pod view on Meta::CPAN
InterfaÈa lui B<gpt-4o> este instabilÄ Èi nu poate fi garantat cÄ va funcÈiona corect în acest moment.
=item * B<gpt5>: gpt-5.5
=back
=item B<--xlate-labor>
=item B<--xlabor>
Ãn loc sÄ apelaÈi motorul de traducere, se aÈteaptÄ sÄ lucraÈi manual. DupÄ pregÄtirea textului de tradus, acesta este copiat în clipboard. Se aÈteaptÄ sÄ Ã®l lipiÈi în formular, sÄ copiaÈi rezultatul în clipboard Èi sÄ apÄsaÈi ...
=item B<--xlate-to> (Default: C<EN-US>)
SpecificaÈi limba ÈintÄ. PuteÈi obÈine limbile disponibile cu comanda C<deepl languages> când folosiÈi motorul B<DeepL>.
=item B<--xlate-format>=I<format> (Default: C<conflict>)
SpecificaÈi formatul de ieÈire pentru textul original Èi tradus.
UrmÄtoarele formate, altele decât C<xtxt>, presupun cÄ partea de tradus este o colecÈie de linii. De fapt, este posibil sÄ traduceÈi doar o porÈiune a unei linii, dar specificarea unui format diferit de C<xtxt> nu va produce rezultate semnific...
docs/src/xlate.gpt5-RO.pod view on Meta::CPAN
Textul original Èi cel convertit sunt tipÄrite separate de o linie goalÄ. Pentru C<space+>, se afiÈeazÄ Èi un rând nou dupÄ textul convertit.
=item B<xtxt>
DacÄ formatul este C<xtxt> (text tradus) sau necunoscut, se tipÄreÈte doar textul tradus.
=back
=item B<--xlate-maxlen>=I<chars> (Default: 0)
SpecificaÈi lungimea maximÄ a textului care va fi trimis la API dintr-o singurÄ datÄ. Valoarea implicitÄ este setatÄ pentru serviciul contului DeepL gratuit: 128K pentru API (B<--xlate>) Èi 5000 pentru interfaÈa clipboard (B<--xlate-labor>). ...
=item B<--xlate-maxline>=I<n> (Default: 0)
SpecificaÈi numÄrul maxim de linii de text care vor fi trimise la API dintr-o singurÄ datÄ.
SetaÈi aceastÄ valoare la 1 dacÄ doriÈi sÄ traduceÈi câte o linie pe rând. AceastÄ opÈiune are prioritate faÈÄ de opÈiunea C<--xlate-maxlen>.
=item B<--xlate-prompt>=I<text>
SpecificaÈi un prompt personalizat care sÄ fie trimis motorului de traducere. AceastÄ opÈiune este disponibilÄ numai când se folosesc motoare ChatGPT (gpt3, gpt4o, gpt5). PuteÈi personaliza comportamentul traducerii furnizând instrucÈiuni sp...
docs/src/xlate.pod view on Meta::CPAN
=item * B<gpt5>: gpt-5.5
=back
=item B<--xlate-labor>
=item B<--xlabor>
Instead of calling translation engine, you are expected to work for.
After preparing text to be translated, they are copied to the
clipboard. You are expected to paste them to the form, copy the
result to the clipboard, and hit return.
=item B<--xlate-to> (Default: C<EN-US>)
Specify the target language. You can get available languages by
C<deepl languages> command when using B<DeepL> engine.
=item B<--xlate-format>=I<format> (Default: C<conflict>)
Specify the output format for original and translated text.
docs/src/xlate.pod view on Meta::CPAN
If the format is C<xtxt> (translated text) or unkown, only translated
text is printed.
=back
=item B<--xlate-maxlen>=I<chars> (Default: 0)
Specify the maximum length of text to be sent to the API at once.
Default value is set as for free DeepL account service: 128K for the
API (B<--xlate>) and 5000 for the clipboard interface
(B<--xlate-labor>). You may be able to change these value if you are
using Pro service.
=item B<--xlate-maxline>=I<n> (Default: 0)
Specify the maximum lines of text to be sent to the API at once.
Set this value to 1 if you want to translate one line at a time. This
option takes precedence over the C<--xlate-maxlen> option.
lib/App/Greple/xlate.pm view on Meta::CPAN
=item * B<gpt5>: gpt-5.5
=back
=item B<--xlate-labor>
=item B<--xlabor>
Instead of calling translation engine, you are expected to work for.
After preparing text to be translated, they are copied to the
clipboard. You are expected to paste them to the form, copy the
result to the clipboard, and hit return.
=item B<--xlate-to> (Default: C<EN-US>)
Specify the target language. You can get available languages by
C<deepl languages> command when using B<DeepL> engine.
=item B<--xlate-format>=I<format> (Default: C<conflict>)
Specify the output format for original and translated text.
lib/App/Greple/xlate.pm view on Meta::CPAN
If the format is C<xtxt> (translated text) or unkown, only translated
text is printed.
=back
=item B<--xlate-maxlen>=I<chars> (Default: 0)
Specify the maximum length of text to be sent to the API at once.
Default value is set as for free DeepL account service: 128K for the
API (B<--xlate>) and 5000 for the clipboard interface
(B<--xlate-labor>). You may be able to change these value if you are
using Pro service.
=item B<--xlate-maxline>=I<n> (Default: 0)
Specify the maximum lines of text to be sent to the API at once.
Set this value to 1 if you want to translate one line at a time. This
option takes precedence over the C<--xlate-maxlen> option.
lib/App/Greple/xlate.pm view on Meta::CPAN
option --xlate-setopt --prologue &__PACKAGE__::set($<shift>)
option --xlate-color \
--postgrep &__PACKAGE__::postgrep \
--callback &__PACKAGE__::callback \
--begin &__PACKAGE__::begin \
--end &__PACKAGE__::end
option --xlate --xlate-color --color=never
option --xlate-fold --xlate --xlate-fold-line
option --xlate-labor --xlate --deepl-method=clipboard
option --xlabor --xlate-labor
option --xlate-mask \
--begin &__PACKAGE__::begin \
--callback &__PACKAGE__::mask_string
option --cache-clear --xlate-cache=clear
option --match-all --re '\A(?s).+\z'
option --match-entire --match-all
lib/App/Greple/xlate/deepl.pm view on Meta::CPAN
use App::Greple::xlate qw(%opt &opt);
use App::Greple::xlate::Lang qw(%LANGNAME);
our $lang_from //= 'ORIGINAL';
our $lang_to //= 'JA';
our $auth_key;
our $method //= 'deepl';
my %param = (
deepl => { max => 128 * 1024, sub => \&deepl },
clipboard => { max => 5000, sub => \&clipboard },
);
sub deepl {
state $deepl = Command::Run->new;
state $command = do {
my $glossary = $App::Greple::xlate::glossary;
my @c = ('deepl', 'text');
push @c, ('--to', $lang_to);
push @c, ('--from', $lang_from) if $lang_from ne 'ORIGINAL';
push @c, ('--auth-key', $auth_key) if $auth_key;
push @c, ('--glossary-id', $glossary) if $glossary;
if (my @contexts = @{$opt{contexts}}) {
push @c, '--context' => join "\n", @contexts;
}
\@c;
};
$deepl->command(@$command, shift)->update->data;
}
sub clipboard {
require Clipboard and import Clipboard unless state $called++;
my $from = shift;
my $length = length $from;
Clipboard->copy($from);
STDERR->printflush(
"$length characters stored in the clipboard.\n",
"Translate it to \"$lang_to\" and clip again.\n",
"Then hit enter: ");
if (open my $fh, "/dev/tty" or die) {
my $answer = <$fh>;
}
my $to = Clipboard->paste;
$to = decode('utf8', $to) if not utf8::is_utf8($_);
return $to;
}
lib/App/xlate.pm view on Meta::CPAN
xlate -DMa -t EN-US example.docx
2. Translate to multiple languages and formats:
xlate -M -o 'xtxt ifdef' -t 'EN-US KO ZH' example.docx
3. Run a command in Docker container:
xlate -C sdif -V --nocdif example.EN-US.cm
4. Translate without using API (via clipboard):
xlate -t JA README.md
=head1 SEE ALSO
L<App::Greple::xlate>
L<App::dozo> - Generic Docker runner used by xlate for container operations
=head1 AUTHOR
script/xlate view on Meta::CPAN
fi
declare -a module option
module+=(-Mxlate)
option+=(--xlate-engine="$engine")
option+=(--xlate-to="$to_lang" --xlate-format="$format" --xlate-cache=yes)
option+=(--all)
[[ ${from_lang:-} ]] && option+=(--xlate-from "$from_lang")
[[ ${api:-} ]] || use_clipboard=yes
[[ ${check:-} ]] || option+=(--xlate${use_clipboard:+-labor})
[[ ${wrap:-} ]] && option+=(--xlate-fold-line --xlate-fold-width=$wrap)
[[ ${trace:-} ]] && option+=(-dmo)
[[ ${refresh:-} ]] && option+=(--xlate-cache=clear)
[[ ${update:-} ]] && option+=(--xlate-update)
[[ ${silent:-} ]] && option+=(--no-xlate-progress)
[[ ${maxlen:-} ]] && option+=(--xlate-maxlen="$maxlen")
[[ ${maskfile:-} ]] && option+=(--xlate-setopt "maskfile=$maskfile")
[[ ${glossary:-} ]] && option+=(--xlate-glossary "$glossary")
declare -a area
script/xlate view on Meta::CPAN
xlate -DMa -t EN-US example.docx
2. Translate to multiple languages and formats:
xlate -M -o 'xtxt ifdef' -t 'EN-US KO ZH' example.docx
3. Run a command in Docker container:
xlate -C sdif -V --nocdif example.EN-US.cm
4. Translate without using API (via clipboard):
xlate -t JA README.md
=head1 SEE ALSO
L<App::Greple::xlate>
L<App::dozo> - Generic Docker runner used by xlate for container operations
=head1 AUTHOR