mirror of
https://github.com/friendica/friendica
synced 2025-04-28 12:24:23 +02:00
Merge pull request #4312 from zeroadam/feature/L10n
Move pgettext to src
This commit is contained in:
commit
30c1cc0e8c
144 changed files with 3411 additions and 3186 deletions
|
@ -12,6 +12,7 @@ use Friendica\App;
|
|||
use Friendica\Content\OEmbed;
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBM;
|
||||
|
@ -1393,8 +1394,8 @@ class DFRN
|
|||
|
||||
logger("updating birthday: ".$birthday." for contact ".$contact["id"]);
|
||||
|
||||
$bdtext = sprintf(t("%s\'s birthday"), $contact["name"]);
|
||||
$bdtext2 = sprintf(t("Happy Birthday %s"), " [url=".$contact["url"]."]".$contact["name"]."[/url]");
|
||||
$bdtext = L10n::t("%s\'s birthday", $contact["name"]);
|
||||
$bdtext2 = L10n::t("Happy Birthday %s", " [url=".$contact["url"]."]".$contact["name"]."[/url]");
|
||||
|
||||
$r = q(
|
||||
"INSERT INTO `event` (`uid`,`cid`,`created`,`edited`,`start`,`finish`,`summary`,`desc`,`type`)
|
||||
|
|
|
@ -13,6 +13,7 @@ use Friendica\App;
|
|||
use Friendica\Core\System;
|
||||
use Friendica\Core\Cache;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBM;
|
||||
|
@ -1933,11 +1934,11 @@ class Diaspora
|
|||
*/
|
||||
private static function constructLikeBody($contact, $parent_item, $guid)
|
||||
{
|
||||
$bodyverb = t('%1$s likes %2$s\'s %3$s');
|
||||
$bodyverb = L10n::t('%1$s likes %2$s\'s %3$s');
|
||||
|
||||
$ulink = "[url=".$contact["url"]."]".$contact["name"]."[/url]";
|
||||
$alink = "[url=".$parent_item["author-link"]."]".$parent_item["author-name"]."[/url]";
|
||||
$plink = "[url=".System::baseUrl()."/display/".urlencode($guid)."]".t("status")."[/url]";
|
||||
$plink = "[url=".System::baseUrl()."/display/".urlencode($guid)."]".L10n::t("status")."[/url]";
|
||||
|
||||
return sprintf($bodyverb, $ulink, $alink, $plink);
|
||||
}
|
||||
|
@ -2405,7 +2406,7 @@ class Diaspora
|
|||
$A = "[url=".$self[0]["url"]."]".$self[0]["name"]."[/url]";
|
||||
$B = "[url=".$contact["url"]."]".$contact["name"]."[/url]";
|
||||
$BPhoto = "[url=".$contact["url"]."][img]".$contact["thumb"]."[/img][/url]";
|
||||
$arr["body"] = sprintf(t('%1$s is now friends with %2$s'), $A, $B)."\n\n\n".$BPhoto;
|
||||
$arr["body"] = L10n::t('%1$s is now friends with %2$s', $A, $B)."\n\n\n".$BPhoto;
|
||||
|
||||
$arr["object"] = self::constructNewFriendObject($contact);
|
||||
|
||||
|
@ -2575,7 +2576,7 @@ class Diaspora
|
|||
intval($contact_record["id"]),
|
||||
0,
|
||||
0,
|
||||
dbesc(t("Sharing notification from Diaspora network")),
|
||||
dbesc(L10n::t("Sharing notification from Diaspora network")),
|
||||
dbesc($hash),
|
||||
dbesc(datetime_convert())
|
||||
);
|
||||
|
@ -3677,7 +3678,7 @@ class Diaspora
|
|||
if ($item["attach"]) {
|
||||
$cnt = preg_match_all('/href=\"(.*?)\"(.*?)title=\"(.*?)\"/ism', $item["attach"], $matches, PREG_SET_ORDER);
|
||||
if (cnt) {
|
||||
$body .= "\n".t("Attachments:")."\n";
|
||||
$body .= "\n".L10n::t("Attachments:")."\n";
|
||||
foreach ($matches as $mtch) {
|
||||
$body .= "[".$mtch[3]."](".$mtch[1].")\n";
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ namespace Friendica\Protocol;
|
|||
use Friendica\App;
|
||||
use Friendica\Core\Cache;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
|
@ -1258,9 +1259,9 @@ class OStatus
|
|||
$root->setAttribute("xmlns:mastodon", NAMESPACE_MASTODON);
|
||||
|
||||
switch ($filter) {
|
||||
case 'activity': $title = t('%s\'s timeline', $owner['name']); break;
|
||||
case 'posts' : $title = t('%s\'s posts' , $owner['name']); break;
|
||||
case 'comments': $title = t('%s\'s comments', $owner['name']); break;
|
||||
case 'activity': $title = L10n::t('%s\'s timeline', $owner['name']); break;
|
||||
case 'posts' : $title = L10n::t('%s\'s posts' , $owner['name']); break;
|
||||
case 'comments': $title = L10n::t('%s\'s comments', $owner['name']); break;
|
||||
}
|
||||
|
||||
$attributes = ["uri" => "https://friendi.ca", "version" => FRIENDICA_VERSION . "-" . DB_UPDATE_VERSION];
|
||||
|
@ -1787,12 +1788,12 @@ class OStatus
|
|||
}
|
||||
|
||||
if ($item['verb'] == ACTIVITY_FOLLOW) {
|
||||
$message = t('%s is now following %s.');
|
||||
$title = t('following');
|
||||
$message = L10n::t('%s is now following %s.');
|
||||
$title = L10n::t('following');
|
||||
$action = "subscription";
|
||||
} else {
|
||||
$message = t('%s stopped following %s.');
|
||||
$title = t('stopped following');
|
||||
$message = L10n::t('%s stopped following %s.');
|
||||
$title = L10n::t('stopped following');
|
||||
$action = "unfollow";
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue