__( 'Translations', 'swiftling' ), 'title' => __( 'Themes & plugins', 'swiftling' ), ) ); Ui::emptyState( __( 'Choose the languages first', 'swiftling' ), __( 'Texts are translated into the languages you choose.', 'swiftling' ), array( __( 'Add languages', 'swiftling' ), admin_url( 'admin.php?page=swiftling-languages' ) ) ); return; } if ( '' !== $swiftling_package_id ) { $swiftling_package = Packages::get( $swiftling_package_id ); if ( ! $swiftling_package ) { Ui::screenHeader( array( 'crumb' => __( 'Translations', 'swiftling' ), 'title' => __( 'Themes & plugins', 'swiftling' ), ) ); Ui::emptyState( __( 'This theme or plugin is not active', 'swiftling' ), __( 'Only the texts of the active theme and plugins are found and translated.', 'swiftling' ), array( __( 'Back to themes and plugins', 'swiftling' ), swiftling_package_url() ) ); return; } // Scanning a theme or plugin and choosing its settings are settings of the site, not translating. if ( ! current_user_can( 'manage_options' ) ) { Ui::screenHeader( array( 'crumb' => __( 'Translations', 'swiftling' ), 'title' => $swiftling_package['name'], ) ); Ui::emptyState( __( 'Only whoever manages the site scans themes and plugins', 'swiftling' ), __( 'The texts found so far are translated from the list of themes and plugins.', 'swiftling' ), array( __( 'Back to themes and plugins', 'swiftling' ), swiftling_package_url() ) ); return; } include __DIR__ . '/' . ( 'scan' === $swiftling_view ? 'themes-plugins-scan.php' : 'themes-plugins-choose.php' ); return; } Ui::screenHeader( array( 'crumb' => __( 'Translations', 'swiftling' ), 'title' => __( 'Themes & plugins', 'swiftling' ), 'description' => __( 'Texts of your theme and plugins: from their settings, such as a footer text or a tracking code, and from their code, such as a button. SwiftLing looks for them only when you ask. Colours, fonts and layout stay the same in every language.', 'swiftling' ), ) ); $swiftling_recording = Recorder::current(); $swiftling_last = Recorder::last(); $swiftling_packages = Packages::all(); $swiftling_counts = Catalogue::counts(); $swiftling_scans = CodeScanner::scans(); /** * Prints the heading of a column with an explanation that shows on hover and on focus. * * @param string $label Heading. * @param string $text What the column shows. * @param string $id ID of the explanation. */ $swiftling_tip = static function ( $label, $text, $id ) { ?> array( 'is-success', __( 'The recording stopped. What it found is listed below.', 'swiftling' ) ), 'recording_pages' => array( 'is-info', __( 'Recording pages of the site: open the site as a visitor would, in a page of your own language or in another one. A panel on each page shows what SwiftLing found; stop it there or here.', 'swiftling' ) ), 'recording_admin' => array( 'is-info', __( 'Recording settings screens: open the settings of a theme or plugin. A panel there shows what SwiftLing found.', 'swiftling' ) ), 'recording_nothing' => array( 'is-info', __( 'Choose what to record: pages of the site, settings screens, or both.', 'swiftling' ) ), ); ?> $swiftling_messages[ $swiftling_notice ][1] ) ); ?>

isActive() ) : ?>

$swiftling_language ) : ?> $swiftling_item ) : ?>

= $swiftling_progress['total'] ? 'reviewed' : ( $swiftling_progress['translated'] ? 'partial' : 'missing' ) ); ?> —