__( 'Reviewed', 'swiftling' ), 'machine' => __( 'Machine translated', 'swiftling' ), 'outdated' => __( 'Original changed since translation', 'swiftling' ), 'partial' => __( 'Partly translated: some items are still empty', 'swiftling' ), 'missing' => __( 'Not translated', 'swiftling' ), ); Ui::screenHeader( array( 'crumb' => __( 'Translations', 'swiftling' ), 'title' => __( 'Menus', 'swiftling' ), 'description' => __( 'The menus you build under Appearance → Menus. Translate the texts of their items, and choose which items each language shows.', 'swiftling' ), ) ); if ( ! $swiftling_languages['targets'] ) { Ui::emptyState( __( 'Choose the languages first', 'swiftling' ), __( 'Content is translated into the languages you choose.', 'swiftling' ), array( __( 'Add languages', 'swiftling' ), admin_url( 'admin.php?page=swiftling-languages' ) ) ); return; } $swiftling_menus = swiftling_can_list( 'edit_theme_options' ) ? swiftling_menus() : array(); if ( ! $swiftling_menus ) { if ( wp_is_block_theme() ) { Ui::emptyState( __( 'This theme has no classic menus', 'swiftling' ), __( 'This theme builds its menu with the Navigation block in the Site Editor. Its items are translated with the header, once for the whole site, in Templates.', 'swiftling' ), array( __( 'Open Templates', 'swiftling' ), admin_url( 'admin.php?page=swiftling-templates' ) ) ); } else { Ui::emptyState( __( 'No menus yet', 'swiftling' ), __( 'Once you build a menu under Appearance → Menus, it shows here to translate.', 'swiftling' ), array( __( 'Build a menu', 'swiftling' ), admin_url( 'nav-menus.php' ) ) ); } return; } $swiftling_places = swiftling_menu_locations(); $swiftling_states = swiftling_menu_states( $swiftling_menus ); ?>