20 Commits
v1.7 ... v1.7.2

Author SHA1 Message Date
Tom Slominski
f03b03a9ce Regenerate German translation 2020-07-03 12:30:43 +01:00
Tom Slominski
da35e6ed8a Merge pull request #44 from olpo24/master
Added German (Du) translations
2020-07-03 12:17:14 +01:00
olpo24
6cddd7cbfe Merge pull request #1 from olpo24/olpo24-patch-1
Added German (DU) translations
2020-07-02 09:16:43 +02:00
olpo24
1e6d79af3c Add files via upload
Added German (DU) translation
2020-07-02 09:12:33 +02:00
Tom Slominski
e731ee38a4 regenerate mo file for chinese translation 2019-05-28 17:01:10 +01:00
Tom Slominski
bee572f031 Merge pull request #42 from wordlesswind/wordlesswind-patch-1
Add Simplified Chinese translation
2019-05-28 16:58:40 +01:00
清靈語
1a1d7709e6 Add Simplified Chinese translation 2019-05-26 04:57:45 +08:00
Tom Slominski
64b91b9185 reCAPTCHA v3 fixes 2019-03-19 10:49:50 +00:00
Tom Slominski
895280fed7 reCAPTCHA v3 support and general tidy up 2019-01-09 14:38:43 +00:00
Tom Slominski
5546bacae8 Update author URL 2019-01-09 14:33:58 +00:00
Tom Slominski
172f4d80fe Improve file_get_contents(). Fixes #38. 2017-04-15 20:42:25 +01:00
Tom Slominski
3204af9ad6 Merge pull request #37 from LordBeaver/master
Update Russian
2016-12-04 19:56:08 +00:00
LordBeaver
4bc6b7ba48 Обновление перевода 2016-11-27 23:42:14 +04:00
Tom Slominski
3173fd4b21 Update README.md 2016-11-08 11:59:17 +00:00
Tom Slominski
6deb8a3b95 Update README.md 2016-11-08 11:58:48 +00:00
Tom Slominski
aaa4d1db4d Add releases link to the top of readme 2016-11-08 11:55:38 +00:00
Tom Slominski
32f9b5582b Update README 2016-11-08 11:05:03 +00:00
Tom Slominski
00700c1a43 Generate Spanish MO 2016-11-08 11:04:14 +00:00
Tom Slominski
02907ca24c Merge pull request #36 from sergiogj/master
add spanish translation
2016-11-08 11:01:56 +00:00
sergiogj
85424a2527 add spanish translation 2016-11-04 13:36:46 +01:00
17 changed files with 1064 additions and 116 deletions

View File

@@ -3,7 +3,9 @@ Infinity Squared
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/tomslominski)
A beautiful public page theme for YOURLS, carefully crafted by [Tom Slominski](http://tomslominski.net/). It can be used to give the public access to your short domain, not just registered users.
[Download](https://github.com/tomslominski/infinity-squared/releases)
A beautiful public page theme for YOURLS, carefully crafted by [Tom Slominski](https://slomin.ski/). It can be used to give the public access to your short domain, not just registered users.
![Front page of Infinity Squared 2.0](http://i.imgur.com/Wc1cVRF.png)
###### Front page of Infinity Squared 2.0
@@ -21,13 +23,13 @@ Features
Installation
------------
1. Download the latest [release](https://github.com/tomslominski/infinity-squared/releases) from GitHub and enter the folder which houses `index.php`.
1. Download the [latest release](https://github.com/tomslominski/infinity-squared/releases/latest) from GitHub and enter the folder which houses `index.php`.
2. Upload all of the files into the directory where you've installed YOURLS. It doesn't have any additional requirements. If you can run YOURLS, you can run ∞²! Some of the files might collide with the files YOURLS also provides, like `README.md`. You can choose to replace them or not, it doesn't matter.
3. Rename `public/config-sample.php` to `public/config.php` and make ∞² suit you.
Upgrade
-------
1. Download the latest [release](https://github.com/tomslominski/infinity-squared/releases) from GitHub and enter the folder which houses `index.php`.
1. Download the [latest release](https://github.com/tomslominski/infinity-squared/releases/latest) from GitHub and enter the folder which houses `index.php`.
2. Remember to do a backup before you make any changes on your server.
3. Replace all of the files from the downloaded release with the release on your server. **Remember that if you've made any changes to the core theme files, they will be overwritten, so be careful!** A `config.php` is not provided with the release, so you don't need to worry about loosing your settings.
4. Copy over any new settings from `config-sample.php` into your own `config.php`.
@@ -40,7 +42,7 @@ You can also create a `public/custom.css` style and change the appropriate setti
Translating
-----------
By default, Infinity Squared comes with Polish and Russian translations, as well as it's default English language. To enable any of those languages, you need to edit YOURLS' `config.php`, as described [here](https://github.com/YOURLS/YOURLS/wiki/YOURLS-in-your-language#install-yourls-in-your-language).
By default, Infinity Squared comes with Polish, Russian and Spanish translations, as well as it's default English language. To enable any of those languages, you need to edit YOURLS' `config.php`, as described [here](https://github.com/YOURLS/YOURLS/wiki/YOURLS-in-your-language#install-yourls-in-your-language).
If you want to translate Infinity Squared into your own language, [this blog post](http://blog.yourls.org/2013/02/workshop-how-to-create-your-own-translation-file-for-yourls/) from YOURLS describes how to do it. You can find the latest .pot file in `public/languages/isq_translation-source.pot`. Please follow the contributing guidelines below to add your translation to Infinity Squared.

View File

@@ -10,24 +10,30 @@
</div>
<footer class="content site-footer">
<p><?php yourls_e( 'Powered by <a href="http://yourls.org/">YOURLS</a>. Designed by <a href="http://tomslominski.net/">Tom Slominski</a>.', 'isq_translation') ?> <a class="icon-github" href="https://github.com/tomslominski/infinity-squared"><?php include('public/images/github.svg'); ?></a></p>
<?php if ( !empty(ISQ::$recaptcha['sitekey']) && !empty(ISQ::$recaptcha['secret']) ) { ?>
<p class="recaptcha-cookie">This site uses cookies for Google reCAPTCHA.<p>
<?php }; ?>
<p><?php yourls_e( 'Powered by <a href="http://yourls.org/">YOURLS</a>. Designed by <a href="https://slomin.ski/">Tom Slominski</a>.', 'isq_translation') ?> <a class="icon-github" href="https://github.com/tomslominski/infinity-squared"><?php include('public/images/github.svg'); ?></a></p>
<?php if( 'recaptcha' == is_get_antispam_method() || 'recaptcha_v3' == is_get_antispam_method() ) : ?>
<p class="recaptcha-cookie"><?php yourls_e('This site uses cookies for Google reCAPTCHA','isq_translation'); ?>.<p>
<?php endif; ?>
</div>
</div>
</div>
<?php global $dependencies; ?>
<?php if ( in_array( 'clipboard.js', $dependencies ) ) { ?>
<script src="public/js/clipboard.min.js"></script>
<script src="public/js/app.js"></script>
<?php }
if ( in_array( 'reCAPTCHA', $dependencies ) ) { ?>
<?php if( in_array( 'recaptcha_v3', $dependencies ) ) : ?>
<script type="text/template" id="recaptcha-sitekey"><?php echo ISQ::$recaptcha_v3['sitekey']; ?></script>
<script src="https://www.google.com/recaptcha/api.js?render=<?php echo ISQ::$recaptcha_v3['sitekey']; ?>"></script>
<?php elseif( in_array( 'recaptcha', $dependencies ) ) : ?>
<script src="https://www.google.com/recaptcha/api.js"></script>
<?php endif; ?>
<?php if( in_array( 'clipboard.js', $dependencies ) ) { ?>
<script src="public/js/clipboard.min.js"></script>
<?php } ?>
<?php if( in_array( 'recaptcha_v3', $dependencies ) || in_array( 'clipboard.js', $dependencies ) ) : ?>
<script src="public/js/app.js"></script>
<?php endif; ?>
</body>
</html>

View File

@@ -10,7 +10,10 @@ if( @include dirname(__FILE__) . '/public/config.php' ) {
include( dirname(__FILE__) . '/public/config-sample.php' );
}
class ISQ { public static $general = array(), $links = array(), $social = array(), $recaptcha = array(); }
class ISQ { public static $general = array(), $links = array(), $social = array(), $recaptcha = array(), $recaptcha_v3 = array(); }
// Load functions
require_once( dirname(__FILE__) . '/public/functions.php' );
// Default dependencies
$dependencies = array();

View File

@@ -30,28 +30,34 @@ $title = isset( $_REQUEST['title'] ) ? yourls_sanitize_title( $_REQUEST['title
</div>
<?php
if ( function_exists( 'yourls_is_valid_user' ) && yourls_is_valid_user() == 1 ) {
switch( is_get_antispam_method() ) {
case 'login': ?>
<input type="hidden" name="antispam_method" value="user_login" class="hidden">
<?php break;
echo '<input type="hidden" name="antispam_method" value="user_login" class="hidden">';
} else if ( !empty(ISQ::$recaptcha['sitekey']) && !empty(ISQ::$recaptcha['secret']) ) {
$dependencies[] = 'reCAPTCHA';
echo '<input type="hidden" name="antispam_method" value="recaptcha" class="hidden">';
case 'recaptcha_v3':
$dependencies[] = 'recaptcha_v3';
?>
<input type="hidden" name="antispam_method" value="recaptcha_v3" class="hidden">
<input type="hidden" name="recaptcha_token" id="recaptcha_token" class="hidden">
<?php break;
case 'recaptcha':
$dependencies[] = 'recaptcha';
?>
<input type="hidden" name="antispam_method" value="recaptcha" class="hidden">
<div class="form-item recaptcha-container">
<p><label class="primary" title=""><?php yourls_e( 'Verification', 'isq_translation'); ?></label></p>
<p><label class="secondary"><?php yourls_e( 'reCAPTCHA verification used to ensure you are not a bot.', 'isq_translation'); ?></label></p>
<div class="g-recaptcha" data-sitekey="<?php echo ISQ::$recaptcha['sitekey']; ?>"></div>
</div>
<?php
} else {
echo '<input type="hidden" name="antispam_method" value="basic" class="hidden">';
echo '<input type="hidden" name="basic_antispam" class="hidden">';
<?php break;
default: ?>
<input type="hidden" name="antispam_method" value="basic" class="hidden">
<input type="hidden" name="basic_antispam" class="hidden">
<?php break;
}
?>

View File

@@ -20,7 +20,7 @@ ISQ::$links = array(
),
array(
'name' => 'Tom Slominski',
'link' => 'http://tomslominski.net/'
'link' => 'https://slomin.ski/'
),
array(
'name' => yourls__( 'Get ∞²!', 'isq_translation' ),
@@ -52,4 +52,11 @@ ISQ::$recaptcha = array(
'secret' => ''
);
// Separate API keys for reCAPTCHA v3
ISQ::$recaptcha_v3 = array(
'sitekey' => '',
'secret' => '',
'threshold' => '0.5',
);
?>

67
public/functions.php Normal file
View File

@@ -0,0 +1,67 @@
<?php
/**
* Return which method is being used for preventing spam,
* based on the site config.
*
* @return string login/recaptcha_v3/recaptcha/basic
*/
function is_get_antispam_method() {
if( 1 == yourls_is_valid_user() ) {
return 'login';
} elseif( isset( ISQ::$recaptcha_v3['sitekey'] ) && ISQ::$recaptcha_v3['sitekey'] && isset( ISQ::$recaptcha_v3['secret'] ) && ISQ::$recaptcha_v3['secret'] ) {
return 'recaptcha_v3';
} elseif( isset( ISQ::$recaptcha['sitekey'] ) && ISQ::$recaptcha['sitekey'] && isset( ISQ::$recaptcha['secret'] ) && ISQ::$recaptcha['secret'] ) {
return 'recaptcha';
} else {
return 'basic';
}
}
/**
* Terminate the request without shortening the URL and
* display an error.
*
* @param string $message Error message.
* @param string $action Action message, defaults to "Go home".
*/
function display_error( $message, $action = null ) {
echo '<div class="content error">';
echo '<p class="message">' . $message . '</p>';
echo '<p class="action">';
if( !empty( $action ) ) {
echo $action;
} else {
echo '<a href="' . YOURLS_SITE . '" class="button">' . yourls__( '&larr; Go home and try again', 'isq_translation' ) . '</a>';
}
echo '</p>';
echo '</div>';
include('footer.php');
die();
}
/**
* Get remote file, either using CURL or file_get_contents
* depending on server configuration.
*
* @param string $url Remote file URL.
* @return string Remote file contents.
*/
function get_remote_file( $url ) {
if( function_exists( 'curl_init' ) ) {
$curl = curl_init();
curl_setopt( $curl, CURLOPT_URL, $url );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );
$output = curl_exec( $curl );
curl_close( $curl );
return $output;
} elseif( ini_get( 'allow_url_fopen' ) ) {
return file_get_contents( $url );
} else {
display_error( yourls__( 'Your server doesn\'t support reCAPTCHA. Ask your host to install cURL or turn on allow_url_fopen.', 'isq_translation' ) );
}
}

View File

@@ -48,3 +48,14 @@ if( document.querySelectorAll( '.copy-button' ).length > 0 ) {
} );
}
// reCAPTCHA
if( 'object' === typeof grecaptcha ) {
grecaptcha.ready( function() {
var sitekey = document.querySelectorAll( '#recaptcha-sitekey' )[0].innerHTML;
grecaptcha.execute( sitekey, {action: 'homepage'} ).then( function( token ) {
document.querySelectorAll( '#recaptcha_token' )[0].value = token;
});
});
}

Binary file not shown.

View File

@@ -0,0 +1,173 @@
msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: POEditor.com\n"
"Project-Id-Version: infinitysqaure\n"
"Language: de\n"
#: footer.php:3
msgid "The bookmarklet"
msgstr "Das Lesezeichen"
#: footer.php:5
msgid "Save this as a bookmark."
msgstr "Speichere dies als Lesezeichen."
#: footer.php:6
msgid "Add this to your bookmarks or drag it to your bookmarks bar to quickly access shortening functions."
msgstr "Füge dies zu deinen Lesezeichen hinzu oder ziehe es in deine Lesezeichenleiste, um schnell auf die Verkürzungsfunktionen zuzugreifen."
#: footer.php:7 index.php:59
msgid "Shorten"
msgstr "Verkürzen"
#: footer.php:8
msgid "This bookmarklet takes the page URL and title and opens a new tab, where you can fill out a CAPTCHA. If you have selected text before using the bookmarklet, that will be used as the keyword."
msgstr "Dieses Lesezeichen verwendet die Seiten-URL und den Titel und öffnet eine neue Registerkarte, auf der Sie ein CAPTCHA ausfüllen können. Wenn du vor der Verwendung des Lesezeichens Text ausgewählt hast, wird dieser als Schlüsselwort verwendet."
#: footer.php:9
msgid "Support for bookmarklets on mobile varies. For example, they work on Chrome for Android but you have to add and sync them from your desktop."
msgstr "Die Unterstützung für Lesezeichen auf Mobilgeräten ist unterschiedlich. Zum Beispiel funktionieren sie unter Chrome für Android, aber Sie müssen sie von Ihrem Desktop aus hinzufügen und synchronisieren."
#: footer.php:13
msgid "Powered by <a href=\"http://yourls.org/\">YOURLS</a>. Designed by <a href=\"http://tomslominski.net/\">Tom Slominski</a>."
msgstr "Unterstützt von <a href=\"http://yourls.org/\"> YOURLS </a>. Entworfen von <a href=\"http://tomslominski.net/\"> Tom Slominski </a>."
#: footer.php:15
msgid "This site uses cookies for Google reCAPTCHA"
msgstr "Diese Website verwendet Cookies für Google reCAPTCHA"
#: index.php:10
msgid "Enter a new URL to shorten"
msgstr "Gebe eine neue URL zum Kürzen ein"
#: index.php:13
msgid "Long URL"
msgstr "Lange URL"
#: index.php:14
msgid "Paste the long URL here. This is required."
msgstr "Füge hier die lange URL ein. Dies ist erforderlich."
#: index.php:20
msgid "Custom keyword"
msgstr "Benutzerdefiniertes Schlüsselwort"
#: index.php:21
msgid "A keyword replaces the default short string."
msgstr "Ein Schlüsselwort ersetzt die Standard-Kurzzeichenfolge."
#: index.php:26
msgid "Custom title"
msgstr "Benutzerdefinierter Titel"
#: index.php:27
msgid "Optional title used when sharing a link from YOURLS using social sharers."
msgstr "Optionaler Titel, der verwendet wird, wenn ein Link von YOURLS mithilfe von Social Sharern freigegeben wird."
#: index.php:44
msgid "Verification"
msgstr "Überprüfung"
#: index.php:45
msgid "reCAPTCHA verification used to ensure you are not a bot."
msgstr "Die reCAPTCHA-Überprüfung wird verwendet, um sicherzustellen, dass du kein Bot bist."
#: public/config-sample.php:26
msgid "Get ∞²!"
msgstr "Hole dir ∞²!"
#: public/config-sample.php:30
msgid "Admin area"
msgstr "Admin-Bereich"
#: result.php:12
msgid "&larr; Go home and try again"
msgstr "& larr; Geh nach Hause und versuche es erneut"
#: result.php:22
msgid "You haven't entered a URL to shorten."
msgstr "Du hast keine zu verkürzende URL eingegeben."
#: result.php:27
msgid "The keyword %1$s is reserved."
msgstr "Das Schlüsselwort% 1 $ s ist reserviert."
#: result.php:32
msgid "The keyword %1$s is taken."
msgstr "Das Schlüsselwort% 1 $ s wird verwendet."
#: result.php:50
msgid "Are you a bot? Google certainly thinks you are."
msgstr "Bist du ein Bot? Google glaubt sicherlich, dass du einer bist."
#: result.php:58
msgid "Are you a bot? The verification was not completed successfully."
msgstr "Bist du ein Bot? Die Überprüfung wurde nicht erfolgreich abgeschlossen."
#: result.php:64
msgid "Are you a bot? No antispam protection was completed successfully."
msgstr "Bist du ein Bot? Es wurde kein Antispam-Schutz erfolgreich abgeschlossen."
#: result.php:84
msgid "The URL could not be shortened."
msgstr "Die URL konnte nicht gekürzt werden."
#: result.php:101
msgid "Your short URL"
msgstr "Deine kurze URL"
#: result.php:105
msgid "Original URL"
msgstr "Ursprüngliche URL"
#: result.php:108 result.php:124 result.php:139
msgid "Copy to clipboard"
msgstr "In die Zwischenablage kopieren"
#: result.php:109 result.php:125 result.php:140
msgid "Copied to clipboard"
msgstr "In die Zwischenablage kopiert"
#: result.php:111 result.php:127 result.php:142
msgid "Press ⌘+C to copy"
msgstr "Drücke zum Kopieren ⌘ + C."
#: result.php:112 result.php:128 result.php:143
msgid "Press Ctrl+C to copy"
msgstr "Drücke zum Kopieren Strg + C."
#: result.php:113 result.php:129 result.php:144
msgid "Tap copy"
msgstr "Tippe auf Kopieren"
#: result.php:114 result.php:130 result.php:145
msgid "Failed to copy"
msgstr "Kopieren fehlgeschlagen"
#: result.php:121
msgid "Short URL"
msgstr "Kurze URL"
#: result.php:136
msgid "Stats"
msgstr "Statistiken"
#: result.php:153
msgid "Share"
msgstr "Teilen"
#: result.php:154
msgid "Share your short URL"
msgstr "Teile deine kurze URL"
#: result.php:175
msgid "QR code"
msgstr "QR-Code"
#: result.php:176
msgid "Share your link with external devices"
msgstr "Teile deinen Link mit externen Geräten"

Binary file not shown.

View File

@@ -0,0 +1,216 @@
msgid ""
msgstr ""
"Project-Id-Version: Infinity Squared\n"
"POT-Creation-Date: 2016-11-04 12:57+0100\n"
"PO-Revision-Date: 2016-11-04 12:58+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: es_ES\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.11\n"
"X-Poedit-KeywordsList: yourls__;yourls_e;yourls_s;yourls_se;"
"yourls_esc_attr__;yourls_esc_html__;yourls_x;yourls_ex;yourls_esc_attr_x;"
"yourls_esc_html_x;yourls_n:1,2;yourls_nx:1,2;yourls_n_noop:1,2;"
"yourls_nx_noop:1,2\n"
"X-Poedit-Basepath: ../..\n"
"X-Poedit-SourceCharset: UTF-8\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-SearchPath-0: public/languages\n"
"X-Poedit-SearchPath-1: .\n"
#: footer.php:3
msgid "The bookmarklet"
msgstr "El marcador"
#: footer.php:5
msgid "Save this as a bookmark."
msgstr "Guardar como marcador"
#: footer.php:6
msgid ""
"Add this to your bookmarks or drag it to your bookmarks bar to quickly "
"access shortening functions."
msgstr ""
"Añada esto a sus marcadores, o arrástrelo a su barra de marcadores para "
"acceder rápidamente a las funciones de acortado de urls"
#: footer.php:7 index.php:59
msgid "Shorten"
msgstr "Acortar"
#: footer.php:8
msgid ""
"This bookmarklet takes the page URL and title and opens a new tab, where you "
"can fill out a CAPTCHA. If you have selected text before using the "
"bookmarklet, that will be used as the keyword."
msgstr ""
"Este marcador toma la URL de la página y el título y abre una nueva pestaña, "
"donde puede llenar una CAPTCHA. Si ha seleccionado texto antes de utilizar "
"el marcador, se utilizará como palabra clave."
#: footer.php:9
msgid ""
"Support for bookmarklets on mobile varies. For example, they work on Chrome "
"for Android but you have to add and sync them from your desktop."
msgstr ""
"Soporte para marcadores en el móvil. Por ejemplo, trabajan en Chrome para "
"Android, pero tienes que añadirlos y sincronizarlos desde tu escritorio."
#: footer.php:13
msgid ""
"Powered by <a href=\"http://yourls.org/\">YOURLS</a>. Designed by <a href="
"\"http://tomslominski.net/\">Tom Slominski</a>."
msgstr ""
"Desarrollado por <a href=\"http://yourls.org/\"> YOURLS </a>. Diseñado por "
"<a href=\"http://tomslominski.net/\"> Tom Slominski </a>."
#: footer.php:15
msgid "This site uses cookies for Google reCAPTCHA"
msgstr "Este sitio usa cookies para Google reCAPTCHA"
#: index.php:10
msgid "Enter a new URL to shorten"
msgstr "Introduzca una url para acortarla"
#: index.php:13
msgid "Long URL"
msgstr "URL Larga"
#: index.php:14
msgid "Paste the long URL here. This is required."
msgstr "Pegue la URL larga aquí (Este campo es obligatorio)"
#: index.php:20
msgid "Custom keyword"
msgstr "Personalizar palabra clave"
#: index.php:21
msgid "A keyword replaces the default short string."
msgstr "Una palabra clave, reemplaza la cadena de caracteres por defecto"
#: index.php:26
msgid "Custom title"
msgstr "Título personalizadon"
#: index.php:27
msgid ""
"Optional title used when sharing a link from YOURLS using social sharers."
msgstr ""
"Título opcional usado cuando compartes en una red social un enlace usando "
"los botones de abajo"
#: index.php:44
msgid "Verification"
msgstr "Verificación"
#: index.php:45
msgid "reCAPTCHA verification used to ensure you are not a bot."
msgstr "Verificación reCAPTCHA para asegurar que no eres un robot"
#: public/config-sample.php:26
msgid "Get ∞²!"
msgstr "¡Obtener ∞²!"
#: public/config-sample.php:30
msgid "Admin area"
msgstr "Área de administración"
#: result.php:12
msgid "&larr; Go home and try again"
msgstr "&larr; Ir a inicio e intentarlo de nuevo"
#: result.php:22
msgid "You haven't entered a URL to shorten."
msgstr ""
"No has introducido una URL para acortar, por favor vuelva atrás e inténtelo "
"de nuevo"
#: result.php:27
#, php-format
msgid "The keyword %1$s is reserved."
msgstr "La palabra clave %1$s está reservada"
#: result.php:32
#, php-format
msgid "The keyword %1$s is taken."
msgstr "La palabra clave %1$s ya está en uso"
#: result.php:50
msgid "Are you a bot? Google certainly thinks you are."
msgstr ""
"¿Eres un robot?. Google piensa que si... Por favor, vuelva atrás e inténtelo "
"de nuevo"
#: result.php:58
msgid "Are you a bot? The verification was not completed successfully."
msgstr ""
"¿Eres un robot? La verificación no se ha completado correctamente. Por "
"favor, vuelva atrás e inténtelo de nuevo"
#: result.php:64
msgid "Are you a bot? No antispam protection was completed successfully."
msgstr ""
"¿Eres un robot?. La protección anti spam no se ha completado correctamente. "
"Por favor, vuelva atrás e inténtelo de nuevo"
#: result.php:84
msgid "The URL could not be shortened."
msgstr "La URL no se ha podido acortar"
#: result.php:101
msgid "Your short URL"
msgstr "Su URL acortada"
#: result.php:105
msgid "Original URL"
msgstr "URL Original"
#: result.php:108 result.php:124 result.php:139
msgid "Copy to clipboard"
msgstr "Copiar al portapapeles"
#: result.php:109 result.php:125 result.php:140
msgid "Copied to clipboard"
msgstr "Copiado al portapapeles"
#: result.php:111 result.php:127 result.php:142
msgid "Press ⌘+C to copy"
msgstr "Pulse ⌘+C para copiar"
#: result.php:112 result.php:128 result.php:143
msgid "Press Ctrl+C to copy"
msgstr "Haga clic en un enlace y presione CTRL +C para copiarlo."
#: result.php:113 result.php:129 result.php:144
msgid "Tap copy"
msgstr "Tocar para copiar"
#: result.php:114 result.php:130 result.php:145
msgid "Failed to copy"
msgstr "Falló al copiar"
#: result.php:121
msgid "Short URL"
msgstr "Su URL acortada"
#: result.php:136
msgid "Stats"
msgstr "Estadísticas"
#: result.php:153
msgid "Share"
msgstr "Compartir"
#: result.php:154
msgid "Share your short URL"
msgstr "Compartir su URL corta"
#: result.php:175
msgid "QR code"
msgstr "Código QR"
#: result.php:176
msgid "Share your link with external devices"
msgstr "Comparta su enlace con dispositivos externos"

View File

@@ -0,0 +1,220 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: 2016-11-27 12:21+0300\n"
"PO-Revision-Date: 2016-11-27 20:56+0300\n"
"Last-Translator: Pavel Mezhuev <pavel@onlyfriends.info>\n"
"Language-Team: \n"
"Language: ru_RU\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.11\n"
"X-Poedit-Basepath: ../../..\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Poedit-KeywordsList: yourls_e;yourls__\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-SearchPath-0: trunk\n"
"X-Poedit-SearchPathExcluded-0: trunk/js\n"
"X-Poedit-SearchPathExcluded-1: trunk/admin\n"
"X-Poedit-SearchPathExcluded-2: trunk/includes\n"
"X-Poedit-SearchPathExcluded-3: trunk/yourls-*.php\n"
#: footer.php:3
msgid "The bookmarklet"
msgstr "Букмарклет"
#: footer.php:5
msgid "Save this as a bookmark."
msgstr "Сохраните это как закладку"
#: footer.php:6
msgid ""
"Add this to your bookmarks or drag it to your bookmarks bar to quickly "
"access shortening functions."
msgstr ""
"Перетащите это на панель закладок для быстрого доступа к функции сокращения "
"ссылок."
#: footer.php:7 index.php:59
msgid "Shorten"
msgstr "Сократить"
#: footer.php:8
msgid ""
"This bookmarklet takes the page URL and title and opens a new tab, where you "
"can fill out a CAPTCHA. If you have selected text before using the "
"bookmarklet, that will be used as the keyword."
msgstr ""
"Букмарклет позволяет быстро создать короткую ссылку, использую адрес и "
"заголовок текущей страницы. Если перед использованием букмарклета выделить "
"на странице текст, то он будет использован как ключевое слово."
#: footer.php:9
msgid ""
"Support for bookmarklets on mobile varies. For example, they work on Chrome "
"for Android but you have to add and sync them from your desktop."
msgstr ""
"Поддержка букмарклетов на мобильных устройствах не гарантируются. Например, "
"они работают в Chrome для Android, но сперва вы должны добавить их на "
"стационарном компьютере и провести синхронизацию."
#: footer.php:13
msgid ""
"Powered by <a href=\"http://yourls.org/\">YOURLS</a>. Designed by <a href="
"\"http://tomslominski.net/\">Tom Slominski</a>."
msgstr ""
"Работает на <a href=\"http://yourls.org/\">YOURLS</a>. Дизайн <a href="
"\"http://tomslominski.net/\">Tom Slominski</a>."
#: footer.php:15
msgid "This site uses cookies for Google reCAPTCHA"
msgstr "Этот сайт использует куки-файлы для Google reCAPTCHA"
#: index.php:10
msgid "Enter a new URL to shorten"
msgstr "Пожалуйста, введите URL"
#: index.php:13
msgid "Long URL"
msgstr "Исходная ссылка"
#: index.php:14
msgid "Paste the long URL here. This is required."
msgstr "Укажите ссылку, которую требуется сократить. Обязательно к заполнению."
#: index.php:20
msgid "Custom keyword"
msgstr "Ключевое слово"
#: index.php:21
msgid "A keyword replaces the default short string."
msgstr "Заменяет короткий адрес по умолчанию."
#: index.php:26
msgid "Custom title"
msgstr "Наименование"
#: index.php:27
msgid ""
"Optional title used when sharing a link from YOURLS using social sharers."
msgstr "При размещении ссылки в социальных сетях."
#: index.php:44
msgid "Verification"
msgstr "Проверка"
#: index.php:45
msgid "reCAPTCHA verification used to ensure you are not a bot."
msgstr "reCAPTCHA используется для защиты от спама."
#: public/config-sample.php:26
msgid "Get ∞²!"
msgstr "Получить ∞²!"
#: public/config-sample.php:30
msgid "Admin area"
msgstr "Администратор"
#: result.php:12
msgid "&larr; Go home and try again"
msgstr "&larr; Вернуться и попробовать снова"
#: result.php:22
msgid "You haven't entered a URL to shorten."
msgstr "Вы не указали ссылку, которую требуется сократить."
#: result.php:27
#, php-format
msgid "The keyword %1$s is reserved."
msgstr "Ключевое слово %1$s зарезервировано."
#: result.php:32
#, php-format
msgid "The keyword %1$s is taken."
msgstr "Ключевое слово %1$s уже используется."
#: result.php:50
msgid "Are you a bot? Google certainly thinks you are."
msgstr "Вы бот? Пожалуйста вернитесь и попробуйте снова."
#: result.php:58
msgid "Are you a bot? The verification was not completed successfully."
msgstr "Вы бот? Проверка не была успешно завершена."
#: result.php:64
msgid "Are you a bot? No antispam protection was completed successfully."
msgstr "Вы бот? Проверка не была успешно завершена."
#: result.php:84
msgid "The URL could not be shortened."
msgstr ""
#: result.php:101
msgid "Your short URL"
msgstr "Ваша короткая ссылка"
#: result.php:105
msgid "Original URL"
msgstr "Исходная ссылка"
#: result.php:108 result.php:124 result.php:139
msgid "Copy to clipboard"
msgstr "Скопировать в буфер обмена"
#: result.php:109 result.php:125 result.php:140
msgid "Copied to clipboard"
msgstr "Cкопировано в буфер обмена"
#: result.php:111 result.php:127 result.php:142
msgid "Press ⌘+C to copy"
msgstr ""
#: result.php:112 result.php:128 result.php:143
msgid "Press Ctrl+C to copy"
msgstr ""
#: result.php:113 result.php:129 result.php:144
msgid "Tap copy"
msgstr ""
#: result.php:114 result.php:130 result.php:145
msgid "Failed to copy"
msgstr ""
#: result.php:121
msgid "Short URL"
msgstr "Короткая ссылка"
#: result.php:136
msgid "Stats"
msgstr "Статистика"
#: result.php:153
msgid "Share"
msgstr "Поделиться"
#: result.php:154
msgid "Share your short URL"
msgstr "Поделиться короткой ссылкой в социальных сетях"
#: result.php:175
msgid "QR code"
msgstr "QR-код"
#: result.php:176
msgid "Share your link with external devices"
msgstr "Поделиться короткой ссылкой с другим устройством"
#~ msgid "Copied!"
#~ msgstr "Скопировано!"
#~ msgid "&larr; Go back and try again"
#~ msgstr "&larr; Вернуться и попробовать снова"
#~ msgid "The keyword %1$s is restricted."
#~ msgstr "Ключевое слово %1$s запрещено."
#~ msgid "Click on a link and press Ctrl+C to quickly copy it."
#~ msgstr "Для копирования щёлкните по ссылке и нажмите Ctrl+C."

View File

@@ -1,22 +1,24 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Infinity Squared\n"
"POT-Creation-Date: 2015-03-22 19:25-0000\n"
"POT-Creation-Date: 2016-11-04 12:50+0100\n"
"PO-Revision-Date: 2015-03-22 19:25-0000\n"
"Last-Translator: Tom Slominski <me@tomslominski>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.7.5\n"
"X-Generator: Poedit 1.8.11\n"
"X-Poedit-KeywordsList: yourls__;yourls_e;yourls_s;yourls_se;"
"yourls_esc_attr__;yourls_esc_html__;yourls_x;yourls_ex;yourls_esc_attr_x;"
"yourls_esc_html_x;yourls_n:1,2;yourls_nx:1,2;yourls_n_noop:1,2;"
"yourls_nx_noop:1,2\n"
"X-Poedit-Basepath: .\n"
"X-Poedit-Basepath: ../..\n"
"X-Poedit-SourceCharset: UTF-8\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-SearchPath-0: .\n"
"X-Poedit-SearchPath-0: public/languages\n"
"X-Poedit-SearchPath-1: .\n"
#: footer.php:3
msgid "The bookmarklet"
@@ -32,7 +34,7 @@ msgid ""
"access shortening functions."
msgstr ""
#: footer.php:7 index.php:61
#: footer.php:7 index.php:59
msgid "Shorten"
msgstr ""
@@ -55,8 +57,8 @@ msgid ""
"\"http://tomslominski.net/\">Tom Slominski</a>."
msgstr ""
#: footer.php:31
msgid "Copied!"
#: footer.php:15
msgid "This site uses cookies for Google reCAPTCHA"
msgstr ""
#: index.php:10
@@ -71,88 +73,125 @@ msgstr ""
msgid "Paste the long URL here. This is required."
msgstr ""
#: index.php:21
#: index.php:20
msgid "Custom keyword"
msgstr ""
#: index.php:22
#: index.php:21
msgid "A keyword replaces the default short string."
msgstr ""
#: index.php:27
#: index.php:26
msgid "Custom title"
msgstr ""
#: index.php:28
#: index.php:27
msgid ""
"Optional title used when sharing a link from YOURLS using social sharers."
msgstr ""
#: index.php:46
#: index.php:44
msgid "Verification"
msgstr ""
#: index.php:47
#: index.php:45
msgid "reCAPTCHA verification used to ensure you are not a bot."
msgstr ""
#: result.php:17
msgid "You haven't entered a URL to shorten. Please go back and try again."
#: public/config-sample.php:26
msgid "Get ∞²!"
msgstr ""
#: result.php:35
msgid ""
"Are you a bot? Google certainly thinks you are. Please go back and try again."
#: public/config-sample.php:30
msgid "Admin area"
msgstr ""
#: result.php:43
msgid ""
"Are you a bot? The verification was not completed successfully. Please go "
"back and try again."
#: result.php:12
msgid "&larr; Go home and try again"
msgstr ""
#: result.php:49
msgid ""
"Are you a bot? No antispam protection was completed successfully. Please go "
"back and try again."
#: result.php:22
msgid "You haven't entered a URL to shorten."
msgstr ""
#: result.php:92
#: result.php:27
#, php-format
msgid "The keyword %1$s is reserved."
msgstr ""
#: result.php:32
#, php-format
msgid "The keyword %1$s is taken."
msgstr ""
#: result.php:50
msgid "Are you a bot? Google certainly thinks you are."
msgstr ""
#: result.php:58
msgid "Are you a bot? The verification was not completed successfully."
msgstr ""
#: result.php:64
msgid "Are you a bot? No antispam protection was completed successfully."
msgstr ""
#: result.php:84
msgid "The URL could not be shortened."
msgstr ""
#: result.php:101
msgid "Your short URL"
msgstr ""
#: result.php:96
#: result.php:105
msgid "Original URL"
msgstr ""
#: result.php:98 result.php:106 result.php:112
#: result.php:108 result.php:124 result.php:139
msgid "Copy to clipboard"
msgstr ""
#: result.php:104
msgid "Short URL"
#: result.php:109 result.php:125 result.php:140
msgid "Copied to clipboard"
msgstr ""
#: result.php:110
msgid "Stats"
#: result.php:111 result.php:127 result.php:142
msgid "Press ⌘+C to copy"
msgstr ""
#: result.php:117
msgid "Click on a link and press Ctrl+C to quickly copy it."
#: result.php:112 result.php:128 result.php:143
msgid "Press Ctrl+C to copy"
msgstr ""
#: result.php:113 result.php:129 result.php:144
msgid "Tap copy"
msgstr ""
#: result.php:114 result.php:130 result.php:145
msgid "Failed to copy"
msgstr ""
#: result.php:121
msgid "Short URL"
msgstr ""
#: result.php:136
msgid "Stats"
msgstr ""
#: result.php:153
msgid "Share"
msgstr ""
#: result.php:122
#: result.php:154
msgid "Share your short URL"
msgstr ""
#: result.php:140
#: result.php:175
msgid "QR code"
msgstr ""
#: result.php:140
#: result.php:176
msgid "Share your link with external devices"
msgstr ""

Binary file not shown.

View File

@@ -0,0 +1,204 @@
msgid ""
msgstr ""
"Project-Id-Version: Infinity Squared\n"
"POT-Creation-Date: 2019-05-26 04:25+0800\n"
"PO-Revision-Date: 2019-05-26 04:55+0800\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.2.3\n"
"X-Poedit-KeywordsList: yourls__;yourls_e;yourls_s;yourls_se;"
"yourls_esc_attr__;yourls_esc_html__;yourls_x;yourls_ex;yourls_esc_attr_x;"
"yourls_esc_html_x;yourls_n:1,2;yourls_nx:1,2;yourls_n_noop:1,2;"
"yourls_nx_noop:1,2\n"
"X-Poedit-Basepath: ../..\n"
"X-Poedit-SourceCharset: UTF-8\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"Last-Translator: wordlesswind <i@qingly.me>\n"
"Language: zh_CN\n"
"X-Poedit-SearchPath-0: public/languages\n"
"X-Poedit-SearchPath-1: .\n"
#: footer.php:3
msgid "The bookmarklet"
msgstr "书签"
#: footer.php:5
msgid "Save this as a bookmark."
msgstr "将其另存为书签。"
#: footer.php:6
msgid ""
"Add this to your bookmarks or drag it to your bookmarks bar to quickly "
"access shortening functions."
msgstr "将其添加到书签或将其拖拽到书签栏中,以便快速访问缩短功能。"
#: footer.php:7 index.php:59
msgid "Shorten"
msgstr "缩短"
#: footer.php:8
msgid ""
"This bookmarklet takes the page URL and title and opens a new tab, where you "
"can fill out a CAPTCHA. If you have selected text before using the "
"bookmarklet, that will be used as the keyword."
msgstr ""
"此书签会获取页面的URL和标题并打开一个新标签页您可以在其中填写验证码。如果"
"您在使用书签之前选择了文本,那么它将成为关键字。"
#: footer.php:9
msgid ""
"Support for bookmarklets on mobile varies. For example, they work on Chrome "
"for Android but you have to add and sync them from your desktop."
msgstr ""
"对移动设备上的书签的支持各不相同。例如,它们适用于 Android 的 Chrome但您必"
"须从桌面添加并同步它们。"
#: footer.php:13
msgid ""
"Powered by <a href=\"http://yourls.org/\">YOURLS</a>. Designed by <a href="
"\"http://tomslominski.net/\">Tom Slominski</a>."
msgstr ""
"由 <a href=\"http://yourls.org/\">YOURLS</a> 驱动。由 <a href=\"http://"
"tomslominski.net/\">Tom Slominski </a>设计。"
#: footer.php:15
msgid "This site uses cookies for Google reCAPTCHA"
msgstr "本网站需要 cookies 来使用 Google reCAPTCHA"
#: index.php:10
msgid "Enter a new URL to shorten"
msgstr "输入要缩短的新网址"
#: index.php:13
msgid "Long URL"
msgstr "长网址"
#: index.php:14
msgid "Paste the long URL here. This is required."
msgstr "必须在此粘贴长网址。"
#: index.php:20
msgid "Custom keyword"
msgstr "自定义关键字"
#: index.php:21
msgid "A keyword replaces the default short string."
msgstr "关键字将替换默认的短字符串。"
#: index.php:26
msgid "Custom title"
msgstr "自定义标题"
#: index.php:27
msgid ""
"Optional title used when sharing a link from YOURLS using social sharers."
msgstr "可选标题,在 YOURLS 使用 social sharers 分享链接时采用"
#: index.php:44
msgid "Verification"
msgstr "验证"
#: index.php:45
msgid "reCAPTCHA verification used to ensure you are not a bot."
msgstr "reCAPTCHA 验证用于确保您不是机器人。"
#: public/config-sample.php:26
msgid "Get ∞²!"
msgstr "获取 ∞²!"
#: public/config-sample.php:30
msgid "Admin area"
msgstr "管理界面"
#: result.php:12
msgid "&larr; Go home and try again"
msgstr "返回首页并再试一次"
#: result.php:22
msgid "You haven't entered a URL to shorten."
msgstr "您尚未输入要缩短的网址。"
#: result.php:27
#, php-format
msgid "The keyword %1$s is reserved."
msgstr "关键字 %1$s 已被保留。"
#: result.php:32
#, php-format
msgid "The keyword %1$s is taken."
msgstr "关键字 %1$s 已被使用。"
#: result.php:50
msgid "Are you a bot? Google certainly thinks you are."
msgstr "您是机器人吗Google 毫无疑问地认为您是。"
#: result.php:58
msgid "Are you a bot? The verification was not completed successfully."
msgstr "您是机器人吗? 验证没有顺利完成。"
#: result.php:64
#, fuzzy
msgid "Are you a bot? No antispam protection was completed successfully."
msgstr "您是机器人吗?防垃圾邮件保护已成功完成。"
#: result.php:84
msgid "The URL could not be shortened."
msgstr "该网址无法被缩短。"
#: result.php:101
msgid "Your short URL"
msgstr "您的短网址"
#: result.php:105
msgid "Original URL"
msgstr "原始网址"
#: result.php:108 result.php:124 result.php:139
msgid "Copy to clipboard"
msgstr "复制到剪贴板"
#: result.php:109 result.php:125 result.php:140
msgid "Copied to clipboard"
msgstr "已复制到剪贴板"
#: result.php:111 result.php:127 result.php:142
msgid "Press ⌘+C to copy"
msgstr "按 ⌘+ C 进行复制"
#: result.php:112 result.php:128 result.php:143
msgid "Press Ctrl+C to copy"
msgstr "按 Ctrl + C 进行复制"
#: result.php:113 result.php:129 result.php:144
msgid "Tap copy"
msgstr "点击复制"
#: result.php:114 result.php:130 result.php:145
msgid "Failed to copy"
msgstr "无法复制"
#: result.php:121
msgid "Short URL"
msgstr "短网址"
#: result.php:136
msgid "Stats"
msgstr "统计"
#: result.php:153
msgid "Share"
msgstr "分享"
#: result.php:154
msgid "Share your short URL"
msgstr "分享您的短网址"
#: result.php:175
msgid "QR code"
msgstr "二维码"
#: result.php:176
msgid "Share your link with external devices"
msgstr "与外部设备分享您的链接"

View File

@@ -1,23 +1,6 @@
<?php
include('header.php');
function display_error( $message, $action = null ) {
echo '<div class="content error">';
echo '<p class="message">' . $message . '</p>';
echo '<p class="action">';
if( !empty( $action ) ) {
echo $action;
} else {
echo '<a href="' . YOURLS_SITE . '" class="button">' . yourls__( '&larr; Go home and try again', 'isq_translation' ) . '</a>';
}
echo '</p>';
echo '</div>';
include('footer.php');
die();
}
if ( empty( $_REQUEST['url'] ) ) {
display_error( yourls__( 'You haven\'t entered a URL to shorten.', 'isq_translation' ) );
};
@@ -35,34 +18,45 @@ if ( !empty( $_REQUEST['keyword'] ) && yourls_keyword_is_taken( $_REQUEST['keywo
// Check what CAPTCHA method was used
$antispam_method = $_REQUEST['antispam_method'];
if ( $antispam_method == 'user_login' ) {
switch( is_get_antispam_method() ) {
case 'login':
if( !yourls_is_valid_user() ) {
display_error( yourls__( 'You are not logged in - please go back and try again.', 'isq_translation' ) );
}
break;
// User is logged into YOURLS
case 'recaptcha_v3':
$recaptcha_data = get_remote_file( 'https://www.google.com/recaptcha/api/siteverify?secret=' . ISQ::$recaptcha_v3['secret'] . '&response=' . $_POST['recaptcha_token'] );
$recaptcha = json_decode( $recaptcha_data );
} else if ( $antispam_method == 'recaptcha' ) {
if( $recaptcha->success != true || $recaptcha->action != 'homepage' || $recaptcha->score < ISQ::$recaptcha_v3['threshold'] ) {
display_error( yourls__( 'Are you a bot? Google certainly thinks you are.', 'isq_translation' ) );
}
break;
case 'recaptcha':
// Google reCAPTCHA is enabled
$recaptcha_data = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=' . ISQ::$recaptcha['secret'] . '&response=' . $_REQUEST['g-recaptcha-response']);
$recaptcha_json = json_decode($recaptcha_data, TRUE);
$recaptcha_data = get_remote_file( 'https://www.google.com/recaptcha/api/siteverify?secret=' . ISQ::$recaptcha['secret'] . '&response=' . $_POST['g-recaptcha-response'] );
$recaptcha_json = json_decode( $recaptcha_data, true );
// What happens when the reCAPTCHA was completed incorrectly
if ( $recaptcha_json['success'] != 'true' ) {
display_error( yourls__( 'Are you a bot? Google certainly thinks you are.', 'isq_translation' ) );
}
break;
} else if ( $antispam_method == 'basic' ) {
case 'basic':
// Basic antispam protection fallback
// What happens when it was not completed correctly
if ( $_REQUEST['basic_antispam'] != "" ) {
display_error( yourls__( 'Are you a bot? The verification was not completed successfully.', 'isq_translation' ) );
if( !empty( $_POST['basic_antispam'] ) ) {
display_error( yourls__( 'Are you a bot? The anti-spam check was not completed successfully.', 'isq_translation' ) );
}
break;
} else {
// No antispam protection was detected
display_error( yourls__( 'Are you a bot? No antispam protection was completed successfully.', 'isq_translation' ) );
default:
// No anti-spam check was completed at all
display_error( yourls__( 'Are you a bot? No anti-spam check was completed successfully.', 'isq_translation' ) );
break;
}
// Get parameters -- they will all be sanitized in yourls_add_new_link()