コード例 #1
0
ファイル: project.php プロジェクト: GlotPress/GlotPress-WP
<?php

gp_title(sprintf(__('%s &lt; GlotPress', 'glotpress'), esc_html($project->name)));
gp_breadcrumb_project($project);
gp_enqueue_scripts(array('gp-editor', 'tablesorter'));
gp_enqueue_style('tablesorter-theme');
$edit_link = gp_link_project_edit_get($project, __('(edit)', 'glotpress'));
if ($project->active) {
    add_filter('gp_breadcrumb_items', function ($items) {
        $items[count($items) - 1] .= ' <span class="active bubble">' . __('Active', 'glotpress') . '</span>';
        return $items;
    });
}
gp_tmpl_header();
?>
<h2><?php 
echo esc_html($project->name);
?>
 <?php 
echo $edit_link;
?>
</h2>
<p class="description">
	<?php 
/**
 * Filter a project description.
 *
 * @since 1.0.0
 *
 * @param string     $description Project description.
 * @param GP_Project $project     The current project.
コード例 #2
0
<?php

gp_title(__('View Glossary &lt; GlotPress', 'glotpress'));
gp_breadcrumb(array(gp_project_links_from_root($project), gp_link_get(gp_url_project_locale($project->path, $locale->slug, $translation_set->slug), $translation_set->name), __('Glossary', 'glotpress')));
$ge_delete_ays = __('Are you sure you want to delete this entry?', 'glotpress');
$delete_url = gp_url_join($url, '-delete');
$glossary_options = compact('can_edit', 'url', 'delete_url', 'ge_delete_ays');
gp_enqueue_scripts('gp-glossary');
wp_localize_script('gp-glossary', '$gp_glossary_options', $glossary_options);
gp_tmpl_header();
?>

<h2><?php 
printf(_x('Glossary for %1$s translation of %2$s', '{language} / { project name}', 'glotpress'), esc_html($translation_set->name), esc_html($project->name));
?>
	<?php 
gp_link_glossary_edit($glossary, $translation_set, __('(edit)', 'glotpress'));
?>
	<?php 
gp_link_glossary_delete($glossary, $translation_set, __('(delete)', 'glotpress'));
?>
</h2>

<?php 
if ($glossary->description) {
    echo '<p class="description">' . make_clickable(nl2br(wp_kses_post($glossary->description))) . '</p>';
}
?>

<table class="glossary" id="glossary">
	<thead>
コード例 #3
0
<?php

gp_title(sprintf(__('Mass-create Translation Sets &lt; %s &lt; GlotPress', 'glotpress'), $project->name));
gp_breadcrumb_project($project);
gp_enqueue_scripts('gp-mass-create-sets-page');
wp_localize_script('gp-mass-create-sets-page', '$gp_mass_create_sets_options', array('url' => gp_url_join(gp_url_current(), 'preview'), 'loading' => __('Loading translation sets to create&hellip;', 'glotpress')));
gp_tmpl_header();
?>
<h2><?php 
_e('Mass-create Translation Sets', 'glotpress');
?>
</h2>
<p><?php 
_e('Here you can mass-create translation sets in this project.
The list of translation sets will be mirrored with the sets of a project you choose.
Usually this is one of the parent projects.', 'glotpress');
?>
</p>
<form action="<?php 
echo esc_url(gp_url_current());
?>
" method="post">
	<dl>
		<dt><label for="project_id"><?php 
_e('Project to take translation sets from:', 'glotpress');
?>
</label></dt>
		<dd><?php 
echo gp_projects_dropdown('project_id', null);
?>
</dd>
コード例 #4
0
ファイル: locales.php プロジェクト: GlotPress/GlotPress-WP
<?php

gp_title(__('Locales &lt; GlotPress', 'glotpress'));
gp_enqueue_scripts(array('gp-common', 'tablesorter'));
gp_enqueue_style('tablesorter-theme');
gp_breadcrumb(array(__('Locales', 'glotpress')));
gp_tmpl_header();
?>

	<h2><?php 
_e('Locales and Languages', 'glotpress');
?>
</h2>
	<div class="locales-filter">
		<?php 
_e('Filter:', 'glotpress');
?>
<input id="locales-filter" type="text" placeholder="<?php 
esc_attr_e('search', 'glotpress');
?>
" />
	</div>

	<table class="tablesorter locales tablesorter-glotpress">
		<thead>
		<tr class="tablesorter-headerRow">
			<th class="header tablesorter-header tablesorter-headerAsc"><?php 
_e('Name (in English)', 'glotpress');
?>
</th>
			<th class="header tablesorter-header tablesorter-headerUnSorted"><?php 
コード例 #5
0
<?php

gp_title(sprintf(__('Translations &lt; %s &lt; %s &lt; GlotPress', 'glotpress'), $translation_set->name, $project->name));
gp_breadcrumb(array(gp_project_links_from_root($project), gp_link_get($url, $translation_set->name)));
gp_enqueue_scripts(array('gp-editor', 'gp-translations-page'));
wp_localize_script('gp-translations-page', '$gp_translations_options', array('sort' => __('Sort', 'glotpress'), 'filter' => __('Filter', 'glotpress')));
// localizer adds var in front of the variable name, so we can't use $gp.editor.options
$editor_options = compact('can_approve', 'can_write', 'url', 'discard_warning_url', 'set_priority_url', 'set_status_url');
wp_localize_script('gp-editor', '$gp_editor_options', $editor_options);
gp_tmpl_header();
$i = 0;
?>
<h2>
	<?php 
printf(__('Translation of %s', 'glotpress'), esc_html($project->name));
?>
: <?php 
echo esc_html($translation_set->name);
?>
	<?php 
gp_link_set_edit($translation_set, $project, __('(edit)', 'glotpress'));
?>
	<?php 
gp_link_set_delete($translation_set, $project, __('(delete)', 'glotpress'));
?>
	<?php 
if ($glossary) {
    ?>
	<?php 
    echo gp_link($glossary->path(), __('glossary', 'glotpress'), array('class' => 'glossary-link'));
    ?>