fix translation
This commit is contained in:
parent
a07ae7a353
commit
5ab1793597
3 changed files with 33 additions and 9 deletions
Binary file not shown.
|
@ -2,7 +2,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: ShaarGem plugin\n"
|
||||
"POT-Creation-Date: 2017-08-19 10:45+0200\n"
|
||||
"PO-Revision-Date: 2021-02-28 20:57+0100\n"
|
||||
"PO-Revision-Date: 2021-02-28 21:26+0100\n"
|
||||
"Language-Team: shaargem\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
@ -16,6 +16,30 @@ msgstr ""
|
|||
"Language: fr_FR\n"
|
||||
"X-Poedit-SearchPath-0: .\n"
|
||||
|
||||
#: shaargem.php:108
|
||||
#: shaargem.php:125
|
||||
msgid "Provides Gemini protocol support."
|
||||
msgstr "Permet l'utilisation du protocole Gemini."
|
||||
|
||||
#: shaargem.php:179
|
||||
msgid "Redirecting to"
|
||||
msgstr "Redirection vers"
|
||||
|
||||
#: shaargem.php:185 shaargem.php:189 shaargem.php:193
|
||||
msgid "Error"
|
||||
msgstr "Erreur"
|
||||
|
||||
#: shaargem.php:185
|
||||
msgid "TEMPORARY FAILURE"
|
||||
msgstr "DÉFAILLANCE TEMPORAIRE"
|
||||
|
||||
#: shaargem.php:189
|
||||
msgid "PERMANENT FAILURE"
|
||||
msgstr "DÉFAILLANCE PERMANENTE"
|
||||
|
||||
#: shaargem.php:193
|
||||
msgid "CLIENT CERTIFICATE REQUIRED"
|
||||
msgstr "CERTIFICAT CLIENT REQUIS"
|
||||
|
||||
#: shaargem.php:197
|
||||
msgid "Invalid response"
|
||||
msgstr "Réponse invalide"
|
||||
|
|
14
shaargem.php
14
shaargem.php
|
@ -123,7 +123,7 @@ function hook_shaargem_render_linklist($data)
|
|||
function shaargem_dummy_translation()
|
||||
{
|
||||
// meta
|
||||
t('Provides Gemini protocol support.');
|
||||
shaargem_t('Provides Gemini protocol support.');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -153,7 +153,7 @@ function fetch_iri_title($iri)
|
|||
$meta = $headers[2];
|
||||
$max_redirects = 10;
|
||||
|
||||
error_log("status:".$status.", meta:".$meta);
|
||||
error_log("[shaargem] status:".$status.", meta:".$meta);
|
||||
|
||||
// status 1x cannot be handled by shaarli, but input field can be used as title
|
||||
if ($status[0] == 1)
|
||||
|
@ -176,25 +176,25 @@ function fetch_iri_title($iri)
|
|||
elseif ($status[0] == 3 and $redirect_counter < $max_redirects)
|
||||
{
|
||||
$redirect_counter++;
|
||||
error_log("[shaargem] found status 30. redirecting to ".$meta." (".$redirect_counter."/".$max_redirects.")");
|
||||
error_log("[shaargem] ".shaargem_t("Redirecting to")." ".$meta." (".$redirect_counter."/".$max_redirects.")");
|
||||
$title[1] = fetch_iri_title($meta);
|
||||
}
|
||||
// 4x 5x 6x are error statuses, should find a better way to display that
|
||||
elseif ($status[0] == 4)
|
||||
{
|
||||
return 'Error '.$status.' (TEMPORARY FAILURE): '.$meta;
|
||||
return shaargem_t('Error').' '.$status.' ('.shaargem_t('TEMPORARY FAILURE').'): '.$meta;
|
||||
}
|
||||
elseif ($status[0] == 5)
|
||||
{
|
||||
return 'Error '.$status.' (PERMANENT FAILURE): '.$meta;
|
||||
return shaargem_t('Error').' '.$status.' ('.shaargem_t('PERMANENT FAILURE').'): '.$meta;
|
||||
}
|
||||
elseif ($status[0] == 6)
|
||||
{
|
||||
return 'Error '.$status.' (CLIENT CERTIFICATE REQUIRED): '.$meta;
|
||||
return shaargem_t('Error').' '.$status.' ('.shaargem_t('CLIENT CERTIFICATE REQUIRED').'): '.$meta;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "Invalid response:".$header;
|
||||
return shaargem_t('Invalid response').': '.$header;
|
||||
}
|
||||
fclose($fp);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue