Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.47
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
local /
wp /
vendor /
wp-cli /
i18n-command /
src /
[ HOME SHELL ]
Name
Size
Permission
Action
BladeCodeExtractor.php
1.88
KB
-rw-r--r--
BladeGettextExtractor.php
1.4
KB
-rw-r--r--
BlockExtractor.php
914
B
-rw-r--r--
CommandNamespace.php
406
B
-rw-r--r--
FileDataExtractor.php
2.23
KB
-rw-r--r--
IterableCodeExtractor.php
11.24
KB
-rw-r--r--
JedGenerator.php
2.11
KB
-rw-r--r--
JsCodeExtractor.php
1.74
KB
-rw-r--r--
JsFunctionsScanner.php
11.79
KB
-rw-r--r--
JsonSchemaExtractor.php
4.76
KB
-rw-r--r--
MakeJsonCommand.php
12.62
KB
-rw-r--r--
MakeMoCommand.php
3.03
KB
-rw-r--r--
MakePhpCommand.php
2.33
KB
-rw-r--r--
MakePotCommand.php
31.8
KB
-rw-r--r--
MapCodeExtractor.php
1.62
KB
-rw-r--r--
PhpArrayGenerator.php
4.1
KB
-rw-r--r--
PhpCodeExtractor.php
1.9
KB
-rw-r--r--
PhpFunctionsScanner.php
2.52
KB
-rw-r--r--
PotGenerator.php
3.88
KB
-rw-r--r--
UpdatePoCommand.php
2.71
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : PotGenerator.php
<?php namespace WP_CLI\I18n; use Gettext\Generators\Po as PoGenerator; use Gettext\Translations; use Gettext\Utils\ParsedComment; /** * POT file generator. * * The only difference to the existing PO file generator is that this * adds some comments at the very beginning of the file. */ class PotGenerator extends PoGenerator { protected static $comments_before_headers = []; /** * Text to include as a comment before the start of the PO contents * * Doesn't need to include # in the beginning of lines, these are added automatically. * * @param string $comment File comment. */ public static function setCommentBeforeHeaders( $comment ) { $comments = explode( "\n", $comment ); foreach ( $comments as $line ) { if ( '' !== trim( $line ) ) { static::$comments_before_headers[] = '# ' . $line; } } } /** * {@parentDoc}. */ public static function toString( Translations $translations, array $options = [] ) { $lines = static::$comments_before_headers; $lines[] = 'msgid ""'; $lines[] = 'msgstr ""'; $plural_form = $translations->getPluralForms(); $plural_size = is_array( $plural_form ) ? ( $plural_form[0] - 1 ) : 1; foreach ( $translations->getHeaders() as $name => $value ) { $lines[] = sprintf( '"%s: %s\\n"', $name, $value ); } $lines[] = ''; foreach ( $translations as $translation ) { /** @var \Gettext\Translation $translation */ if ( $translation->hasComments() ) { foreach ( $translation->getComments() as $comment ) { $lines[] = '# ' . $comment; } } if ( $translation->hasExtractedComments() ) { $unique_comments = array(); /** @var ParsedComment|string $comment */ foreach ( $translation->getExtractedComments() as $comment ) { $comment = ( $comment instanceof ParsedComment ? $comment->getComment() : $comment ); if ( ! in_array( $comment, $unique_comments, true ) ) { $lines[] = '#. ' . $comment; $unique_comments[] = $comment; } } } foreach ( $translation->getReferences() as $reference ) { $lines[] = '#: ' . $reference[0] . ( null !== $reference[1] ? ':' . $reference[1] : '' ); } if ( $translation->hasFlags() ) { $lines[] = '#, ' . implode( ',', $translation->getFlags() ); } $prefix = $translation->isDisabled() ? '#~ ' : ''; if ( $translation->hasContext() ) { $lines[] = $prefix . 'msgctxt ' . self::convertString( $translation->getContext() ); } self::addLines( $lines, $prefix . 'msgid', $translation->getOriginal() ); if ( $translation->hasPlural() ) { self::addLines( $lines, $prefix . 'msgid_plural', $translation->getPlural() ); for ( $i = 0; $i <= $plural_size; $i++ ) { self::addLines( $lines, $prefix . 'msgstr[' . $i . ']', '' ); } } else { self::addLines( $lines, $prefix . 'msgstr', $translation->getTranslation() ); } $lines[] = ''; } return implode( "\n", $lines ); } /** * Escapes and adds double quotes to a string. * * @param string $text Multiline string. * * @return string[] */ protected static function multilineQuote( $text ) { $lines = explode( "\n", $text ); $last = count( $lines ) - 1; foreach ( $lines as $k => $line ) { if ( $k === $last ) { $lines[ $k ] = self::convertString( $line ); } else { $lines[ $k ] = self::convertString( $line . "\n" ); } } return $lines; } /** * Add one or more lines depending whether the string is multiline or not. * * @param array &$lines Array lines should be added to. * @param string $name Name of the line, e.g. msgstr or msgid_plural. * @param string $value The line to add. */ protected static function addLines( array &$lines, $name, $value ) { $newlines = self::multilineQuote( $value ); if ( count( $newlines ) === 1 ) { $lines[] = $name . ' ' . $newlines[0]; } else { $lines[] = $name . ' ""'; foreach ( $newlines as $line ) { $lines[] = $line; } } } }
Close