<?php /** * The settings page * * Displays the settings page for a user. * * @link http://glotpress.org * * @package GlotPress * @since 2.0.0 */ gp_title(__('Your Settings < GlotPress', 'glotpress')); gp_breadcrumb(array(__('Your Settings', 'glotpress'))); gp_tmpl_header(); $per_page = (int) get_user_option('gp_per_page'); if (0 === $per_page) { $per_page = 15; } $default_sort = get_user_option('gp_default_sort'); if (!is_array($default_sort)) { $default_sort = array('by' => 'priority', 'how' => 'desc'); } ?> <h2><?php _e('Your Settings', 'glotpress'); ?> </h2> <form action="" method="post"> <?php include_once __DIR__ . '/settings-edit.php';
<?php gp_title(sprintf(__('Permissions < %s < GlotPress'), $project->name)); gp_breadcrumb_project($project); gp_tmpl_header(); ?> <h2><?php _e('Permissions'); ?> </h2> <h3 id="validators"> <?php _e('Validators'); ?> <?php if (count($permissions) + count($parent_permissions) > 10) { ?> <a href="#add" onclick="jQuery('#user_login').focus(); return false;" class="secondary">Add →</a> <?php } ?> </h3> <?php if ($permissions) { ?> <?php if ($parent_permissions) { ?> <h4 id="validators"><?php _e('Validators for this project'); ?>
<?php gp_title(__('Create New Translation Set < GlotPress')); gp_breadcrumb(array(__('Create New Translation Set'))); gp_tmpl_header(); ?> <h2><?php _e('Create New Translation Set'); ?> </h2> <form action="" method="post"> <?php gp_tmpl_load('translation-set-form', get_defined_vars()); ?> <p><input type="submit" name="submit" value="<?php echo esc_attr(__('Create')); ?> " id="submit" /></p> </form> <?php gp_tmpl_footer();
<?php gp_title(__('View Glossary < 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 = $url . '/-delete'; $glossary_options = compact('can_edit', 'url', 'delete_url', 'ge_delete_ays'); gp_enqueue_script('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')); ?> </h2> <?php if ($glossary->description) { echo '<p class="description">' . make_clickable(nl2br(wp_kses_post($glossary->description))) . '</p>'; } ?> <table class="glossary" id="glossary"> <thead> <tr> <th style="width:20%"><?php _ex('Item', 'glossary entry', 'glotpress');
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width"> <title><?php echo gp_title(); ?> </title> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> <script src="<?php echo gp_url_base_root(); ?> plugins/child-theme/templates/js/html5shiv.js" defer></script> <script src="<?php echo gp_url_base_root(); ?> plugins/child-theme/templates/js/respond.js" defer></script> <![endif]--> <?php gp_head(); ?> </head> <body <?php body_class();
<?php gp_title(__('Projects < GlotPress')); gp_tmpl_header(); ?> <h2><?php printf(__('Projects')); ?> </h2> <p class="intro">Hi there! Here we translate all of the WeFoster Plugins and Themes. If you have an account on WeFoster.co you can use that account to login here, and join our community of translators! Please take a look at our Translators Group to learn more about contributing and the (awesome) rewards it can earn you!</p> <h4> Choose a product to see the translations..</h4> <ul class="list-group"> <?php foreach ($projects as $project) { ?> <li class="list-group-item"> <?php gp_link_project($project, esc_html($project->name)); ?> <?php gp_link_project_edit($project, null, array('class' => 'btn btn-xs btn-primary')); ?> </li> <?php }
<?php gp_title(__('Import into Glossary < 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), gp_link_get(gp_url_project_locale($project->path, $locale->slug, $translation_set->slug) . '/glossary', __('Glossary')), __('import'))); gp_tmpl_header(); ?> <h2><?php _e('Import Glossary Entries'); ?> </h2> <p> <?php printf(__('Use this from to bulk upload glossary entries. The entries should be stored in a CSV file, matching the custom glossary format from <a href="%s">Google Translator Toolkit</a>'), 'https://support.google.com/translate/toolkit/answer/147854'); ?> <br/> </p> <form action="" method="post" enctype="multipart/form-data"> <p> <label for="import-file"><?php _e('Import File:'); ?> </label> <input type="file" name="import-file" id="import-file" /> </p> <p> <input type="submit" value="<?php echo esc_attr(__('Import'));
<?php gp_title(sprintf(__('%s < GlotPress'), __('Login'))); gp_breadcrumb(array(__('Login'))); gp_tmpl_header(); ?> <form action="<?php echo gp_url_ssl(gp_url_current()); ?> " method="post" class="form-signin" role="form"> <h2 class="form-signin-heading"><?php _e('Login'); ?> </h2> <?php do_action('before_login_form'); ?> <input name="user_login" type="text" class="form-control" placeholder="<?php _e('Username'); ?> " required="" autofocus=""> <input name="user_pass" type="password" class="form-control" placeholder="<?php _e('Password'); ?> " required=""> <input type="hidden" value="<?php echo esc_attr(gp_get('redirect_to'));
<?php wp_enqueue_style('base'); wp_enqueue_script('jquery'); global $pagetitle; $pagetitle = gp_title(); require WPORGPATH . 'header.php'; ?> <script type="text/javascript">document.body.className = document.body.className.replace('no-js','js');</script> <div id="headline"> <div class="wrapper"> <h2><a href="http://make.wordpress.org/polyglots/">Translating WordPress</a></h2> <span id="hello"> <a class="menu-link" href="//make.wordpress.org/polyglots/">Blog</a> <a class="menu-link" href="//make.wordpress.org/polyglots/handbook/">Translator Handbook</a> <?php if (GP::$user->logged_in()) { $user = GP::$user->current(); printf(__('Hi, %s.'), '<a href="' . gp_url('/profile') . '">' . $user->user_login . '</a>'); ?> <a href="<?php echo gp_url('/logout'); ?> "><?php _e('Log out'); ?> </a> <?php } else { ?> <strong><a href="<?php
<?php gp_title(sprintf(__('Edit Project %s < GlotPress'), $project->name)); gp_breadcrumb_project($project); gp_tmpl_header(); ?> <h2><?php echo wptexturize(sprintf(__('Edit project "%s"'), esc_html($project->name))); ?> </h2> <form action="" method="post"> <?php gp_tmpl_load('project-form', get_defined_vars()); ?> <p> <input type="submit" name="submit" value="<?php echo esc_attr(__('Save')); ?> " id="submit" /> <span class="or-cancel"><?php _e('or'); ?> <a href="javascript:history.back();"><?php _e('Cancel'); ?> </a></span> </p> </form> <?php gp_tmpl_footer();
<?php gp_title(sprintf(__('Edit Translation Set < %s < %s < GlotPress'), $set->name, $project->name)); gp_breadcrumb(array(gp_link_project_get($project, $project->name), gp_link_get($url, $locale->english_name . 'default' != $set->slug ? ' ' . $set->name : ''))); gp_tmpl_header(); ?> <h2><?php _e('Edit Translation Set'); ?> </h2> <form action="" method="post"> <?php gp_tmpl_load('translation-set-form', get_defined_vars()); ?> <p> <input type="submit" name="submit" value="<?php echo esc_attr(__('Save')); ?> " id="submit" /> <span class="or-cancel">or <a href="javascript:history.back();">Cancel</a></span> </p> </form> <?php gp_tmpl_footer();
<?php /** * Templates: Delete Translation Set * * @package GlotPress * @subpackage Templates * @since 2.0.0 */ gp_title(sprintf(__('Delete Translation Set < %s < %s < GlotPress', 'glotpress'), $set->name, $project->name)); gp_breadcrumb(array(gp_project_links_from_root($project), gp_link_get($url, $locale->english_name . ('default' !== $set->slug ? ' ' . $set->name : '')))); gp_tmpl_header(); ?> <h2><?php _e('Delete Translation Set', 'glotpress'); ?> </h2> <form action="" method="post"> <p> <?php _e('Note this will delete all translations associated with this set!', 'glotpress'); ?> </p> <p> <input type="submit" name="submit" value="<?php esc_attr_e('Delete', 'glotpress'); ?> " id="submit" /> <span class="or-cancel"><?php _e('or', 'glotpress'); ?>
<?php /** * Templates: Delete Glossary * * @package GlotPress * @subpackage Templates * @since 2.0.0 */ gp_title(__('Delete Glossary < 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), gp_link_get(gp_url_join(gp_url_project_locale($project->path, $locale->slug, $translation_set->slug), '/glossary'), __('Glossary', 'glotpress')), __('delete', 'glotpress'))); gp_tmpl_header(); ?> <h2><?php _e('Delete Glossary', 'glotpress'); ?> </h2> <form action="" method="post"> <p> <?php _e('Note this will delete all entries associated with this glossary!', 'glotpress'); ?> </p> <p> <input type="submit" name="submit" value="<?php esc_attr_e('Delete', 'glotpress'); ?> " id="submit" />
<?php /** * Templates: Delete Project * * @package GlotPress * @subpackage Templates * @since 2.0.0 */ gp_title(sprintf(__('Delete Project %s < GlotPress', 'glotpress'), $project->name)); gp_breadcrumb_project($project); gp_tmpl_header(); ?> <h2><?php printf(__('Delete project “%s”', 'glotpress'), esc_html($project->name)); ?> </h2> <form action="" method="post"> <p> <?php _e('Note this will delete all translations, translation sets and child projects!', 'glotpress'); ?> </p> <p> <input type="submit" name="submit" value="<?php esc_attr_e('Delete', 'glotpress'); ?> " id="submit" /> <span class="or-cancel"><?php _e('or', 'glotpress'); ?>
<?php if ('originals' == $kind) { $title = sprintf(__('Import Originals < %s < GlotPress', 'glotpress'), esc_html($project->name)); $return_link = gp_url_project($project); } else { $title = sprintf(__('Import Translations < %s < GlotPress', 'glotpress'), esc_html($project->name)); $return_link = gp_url_project_locale($project, $locale->slug, $translation_set->slug); } gp_title($title); gp_breadcrumb_project($project); gp_tmpl_header(); ?> <h2><?php echo $kind == 'originals' ? __('Import Originals', 'glotpress') : __('Import Translations', 'glotpress'); ?> </h2> <form action="" method="post" enctype="multipart/form-data"> <dl> <dt><label for="import-file"><?php _e('Import File:', 'glotpress'); ?> </label></dt> <dd><input type="file" name="import-file" id="import-file" /></dd> <?php $format_options = array(); foreach (GP::$formats as $slug => $format) { $format_options[$slug] = $format->name; } $format_dropdown = gp_select('format', $format_options, 'po');
<?php gp_title(__('Install < GlotPress')); gp_breadcrumb(array('upgrade' == $action ? __('Upgrade') : __('Install'))); wp_enqueue_style('install'); gp_tmpl_header(); ?> <?php if (isset($errors)) { _e('There were some errors:'); echo '<pre class="message">'; echo implode("\n", $errors); echo '</pre>'; } else { if (isset($success_message)) { echo '<p>' . $success_message . '</p>'; } } ?> <?php // TODO: deny access to scripts folder if ($show_htaccess_instructions) { ?> <p> <?php _e('If your <code>.htaccess</code> file was writeable, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your <code>.htaccess</code> file.'); ?> <pre><?php
<?php gp_title(__('Create New Glossary < 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), __('Create Glossary'))); gp_tmpl_header(); ?> <h2><?php _e('Create New Glossary'); ?> </h2> <form action="" method="post"> <p> <label for="glossary-new-description"><?php _e('Description (optional)'); ?> </label> <span class="ternary"><?php _e('can include HTML'); ?> </span><br/> <textarea class="glossary-description" id="glossary-new-description" name="glossary[description]"></textarea> </p> <p> <input type="hidden" name="glossary[translation_set_id]" value="<?php echo esc_attr($glossary->translation_set_id); ?> "/> <input type="submit" name="submit" value="<?php echo esc_attr(__('Create')); ?> " id="submit" />
<?php gp_title($kind == 'originals' ? sprintf(__('Import Originals < %s < GlotPress'), esc_html($project->name)) : sprintf(__('Import Translations < %s < GlotPress'), esc_html($project->name))); gp_breadcrumb_project($project); gp_tmpl_header(); ?> <h2><?php echo $kind == 'originals' ? __('Import Originals') : __('Import Translations'); ?> </h2> <form action="" method="post" enctype="multipart/form-data" class="form-left form-horizontal" role="form"> <div class="form-group"> <label for="import-file" class="col-sm-4 col-md-3 control-label"><?php _e('Import File:'); ?> </label> <div class="col-sm-4"> <input type="file" id="import-file" class="form-control" name="import-file" /> </div> </div> <div class="form-group"> <label for="format" class="col-sm-4 col-md-3 control-label"><?php _e('Format:'); ?> </label> <div class="col-sm-4"> <?php $format_options = array(); foreach (GP::$formats as $slug => $format) {
<?php gp_title(sprintf(__('Branch Project %s < GlotPress', 'glotpress'), $project->name)); gp_breadcrumb_project($project); gp_tmpl_header(); ?> <h2><?php echo wptexturize(sprintf(__('Branch project "%s"', 'glotpress'), esc_html($project->name))); ?> </h2> <p><?php _e('Here you can branch out this project: everything will be duplicated into a new project for you.', 'glotpress'); ?> </p> <form action="<?php echo esc_url(gp_url_current()); ?> " method="post"> <dt><label for="project[name]"><?php _e('New branch name', 'glotpress'); ?> </label></dt> <dd><input type="text" name="project[name]" value="" placeholder="type tag project name here" id="project[name]"></dd> <!-- TODO: make slug edit WordPress style --> <dt><label for="project[slug]"><?php _e('New Slug', 'glotpress'); ?> </label></dt> <dd> <input type="text" name="project[slug]" value="" id="project[slug]">
<?php gp_title(sprintf(__('Mass-create Translation Sets < %s < GlotPress', 'glotpress'), $project->name)); gp_breadcrumb_project($project); gp_enqueue_script('mass-create-sets-page'); wp_localize_script('mass-create-sets-page', '$gp_mass_create_sets_options', array('url' => gp_url_join(gp_url_current(), 'preview'), 'loading' => __('Loading translation sets to create…', '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>
<?php gp_title(__('Edit Glossary < 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), gp_link_get(gp_url_project_locale($project->path, $locale->slug, $translation_set->slug) . '/glossary', __('Glossary')), __('edit'))); gp_tmpl_header(); ?> <h2><?php _e('Edit Glossary'); ?> </h2> <form action="" method="post"> <p> <label for="glossary-edit-description"><?php _e('Description'); ?> </label> <span class="ternary"><?php _e('can include HTML'); ?> </span> <br/> <textarea class="glossary-description" id="glossary-edit-description" name="glossary[description]"><?php echo esc_html($glossary->description); ?> </textarea> </p> <p> <input type="hidden" name="glossary[id]" value="<?php echo esc_attr($glossary->id); ?>
<?php gp_title(sprintf(__('Permissions < %s < %s < GlotPress'), $translation_set->name, $project->name)); gp_breadcrumb(array(gp_link_project_get($project, $project->name), $locale->english_name, 'default' != $translation_set->slug ? $translation_set->name : '', 'Permissions')); gp_tmpl_header(); ?> <h2>Permissions</h2> <ul id="translation-set-permissions"> <?php foreach ($permissions as $permission) { ?> <li> <span class="permission-action">user</span> <span class="user"><?php echo esc_html($permission->user->user_login); ?> </span> <span class="permission-action">can <?php echo esc_html($permission->action); ?> </span> <a href="<?php echo gp_url_join(gp_url_current(), '_delete/' . $permission->id); ?> " class="action delete">Remove</a> </li> <?php } if (!$permissions) { ?> <strong>No validators defined for this translation set.</strong>
<?php gp_title(sprintf(__('Translations < %s < %s < 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_script('jquery-ui-core'); gp_enqueue_script('gp-editor'); gp_enqueue_script('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 if ($glossary) { ?> <?php echo gp_link($glossary->path(), __('glossary', 'glotpress'), array('class' => 'glossary-link')); ?> <?php
<?php gp_title(sprintf(__('Projects translated to %s < GlotPress'), esc_html($locale->english_name))); gp_breadcrumb(array(gp_link_get('/languages', __('Locales')), esc_html($locale->english_name))); gp_tmpl_header(); ?> <h2><?php printf(__('Active Projects translated to %s'), '<span>' . esc_html($locale->english_name) . '</span>'); ?> </h2> <?php if (empty($projects_data)) { _e('No active projects found.'); } ?> <?php foreach ($projects_data as $project_id => $sub_projects) { ?> <div class="locale-project"> <h3><?php echo $projects[$project_id]->name; ?> </h3> <table class="locale-sub-projects table table-striped"> <thead> <tr> <th class="header" <?php
<?php gp_title(sprintf(__('%s < GlotPress', 'glotpress'), esc_html($project->name))); gp_breadcrumb_project($project); gp_enqueue_script('gp-common'); gp_enqueue_script('tablesorter'); $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 echo apply_filters('gp_project_description', $project->description, $project); ?> </p> <?php if ($can_write) { ?>
<?php gp_title(__('Locales < GlotPress')); wp_enqueue_script('common'); wp_enqueue_script('tablesorter'); $parity = gp_parity_factory(); gp_tmpl_header(); ?> <h2><?php _e('Locales and Languages'); ?> </h2> <div class="locales-filter"> <?php _e('Filter:'); ?> <input id="locales-filter" type="text" placeholder="<?php esc_attr_e('search'); ?> " /> </div> <table class="tablesorter locales"> <thead> <tr> <th class="header"><?php _e('Name (in English)'); ?> </th> <th class="header"><?php
<?php gp_title(__('Not Found < GlotPress')); gp_tmpl_header(); ?> <h2><?php _e('Page not found'); ?> </h2> <p>The page you requested could not be found.</p> <a href="<?php echo gp_url('/'); ?> " class="btn btn-large btn-primary"><span class="glyphicon glyphicon-home"></span> Take Me Home</a> <?php gp_tmpl_footer();
<?php gp_title(__('Create New Project < GlotPress')); gp_breadcrumb(array(__('Create New Project'))); gp_tmpl_header(); ?> <h2><?php _e('Create New Project'); ?> </h2> <form action="" method="post"> <?php gp_tmpl_load('project-form', get_defined_vars()); ?> <p><input type="submit" name="submit" value="<?php echo esc_attr(__('Create')); ?> " id="submit" /></p> </form> <?php gp_tmpl_footer();
<?php gp_title(__('Profile < GlotPress')); gp_breadcrumb(array(__('Profile'))); gp_tmpl_header(); ?> <h2><?php echo $user->display_name; ?> <?php if ($user->admin()) { _e('(Admin)'); } ?> </h2> <div> <div class="user-card"> <div class="user-avatar"><img src="<?php echo $user->get_avatar(); ?> " /> </div> <dl class="user-info"> <dd><?php $locale_keys = array_keys($locales); if (1 < count($locales)) { vprintf(__('%s is a polyglot who knows %s but also knows %s.'), array_merge(array($user->display_name), $locale_keys)); } else { if (!empty($locale_keys)) {
<?php gp_title(__('Help < GlotPress')); gp_tmpl_header(); ?> <h2>Getting Started with translate.wordpress.org</h2> <div class="text"> <?php echo wptexturize(<<<HTML <p><a href="http://glotpress.org/">GlotPress</a> is the open-source engine that powers the translation of WordPress, BuddyPress, and the WordPress apps for Android and BlackBerry. It is a collaborative tool, meant to replace the sometimes tedious process of translating .pot files with other tools.</p> <p>Here's a short introduction on how to use GlotPress for the best and speediest results.</p> <h3>Organization</h3> <p>GlotPress organizes translations in projects and sub projects, so that you could have, say, the "WordPress" project and a sub-project for every version.</p> <p>Every project uses an underlying strings file, which is no more than the file that stores the collected strings from the source code for that particular project. This file only contains strings in english. When users translate strings, the corresponding final files can then be generated and exported (formats vary according to platform) and are the ones actually used by the corresponding applications' (i.e. PHP application, Android or BlackBerry) localisation functions to dynamically show content in other languages.</p> <h3>Users</h3> <p>GlotPress users have one of three profiles: guest, contributor or validator. Guests can see the projects and their translations, while contributors can suggest translations. Validators can do a bit more, but their role consists mostly of approving or discarding suggestions. If you login to the translation platform with your WordPress.org user credentials, you are automatically a contributor (you can <a href="http://wordpress.org/support/register.php">register a username here</a>, if you don't already have one).</p> <h3>Getting Started</h3> <p>To contribute, start by logging in to GlotPress. Choose the project (and sub-project) you will be working on, and after that the language to which you will be translating (called a "translation set", in GlotPress).</p> <p>You will see a list of strings and their translations. Across the top of that list you will see links to the filtering and sorting functions which will help you narrow down the strings you want to work on. (users with a validator profile will see additional options, more on that further down)</p> <p>Strings have "statuses": they can be untranslated, suggested, approved (or current) and fuzzy. Each of these states can have a "warning" flag, meaning that there's something potentially wrong with the translation (missing or unmatched HTML tags are an example of a situation where a warning is triggered)</p>