[glotpress-updates] [GlotPress] #374: Rewrite gp_title() to reduce similar strings
GlotPress
noreply at wordpress.org
Sat Nov 22 22:53:23 UTC 2014
#374: Rewrite gp_title() to reduce similar strings
--------------------------------------+-----------------------------
Reporter: ramiy | Owner:
Type: defect | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Keywords: dev-feedback needs-patch |
--------------------------------------+-----------------------------
Related #372.
Currently the use of '''gp_title()''' generates many similar strings, and
it inflates the .po/.mo file size.
For example, the ''glossary-edit.php'' file:
{{{
<?php gp_title( __('Edit Glossary < GlotPress') ); ?>
<h2><?php _e( 'Edit Glossary'); ?></h2>
}}}
See how the '''gp_title()''' function uses "'''__< GlotPress__'''" at
the end of the title. We use this ending in 23 template files:
* /gp-templates/glossary-import.php -> line 2
* /gp-templates/header.php -> line 10
* /gp-templates/install.php -> line 2
* /gp-templates/translation-set-edit.php -> line 2
* /gp-templates/project-new.php -> line 2
* /gp-templates/project-permissions.php -> line 2
* /gp-templates/project-mass-create-sets.php -> line 2
* /gp-templates/locales.php -> line 2
* /gp-templates/translations.php -> line 2
* /gp-templates/profile.php -> line 2
* /gp-templates/glossary-edit.php -> line 2
* /gp-templates/glossary-view.php -> line 2
* /gp-templates/project-edit.php -> line 2
* /gp-templates/project-branch.php -> line 2
* /gp-templates/glossary-new.php -> line 2
* /gp-templates/translation-set-new.php -> line 2
* /gp-templates/404.php -> line 2
* /gp-templates/project.php -> line 2
* /gp-templates/login.php -> line 2
* /gp-templates/projects.php -> line 2
* /gp-templates/project-import.php -> line 2
* /gp-templates/locale.php -> line 2
* /gp-templates/profile-public.php -> line 2
I think '''gp_title()''' function needs to be rewritten, moving "'''__<
GlotPress__'''" from the template files into the function itself. This way
we will further reduce
[https://translate.wordpress.org/projects/glotpress/dev/he/default?filters%5Bterm%5D&filters%5Buser_login%5D&filters%5Bstatus%5D=current_or_waiting_or_fuzzy_or_untranslated&sort%5Bby%5D=original&sort%5Bhow%5D=desc&sorts=Sort&page=1
the total number of strings need to be translated].
We can also move the "'''__<__'''" into a seperate string so that RTL
users can change this to "'''__&rt;__'''" using only one translation
string.
--
Ticket URL: <https://glotpress.trac.wordpress.org/ticket/374>
GlotPress <https://glotpress.trac.wordpress.org>
Easy comin', easy goin'
More information about the glotpress-updates
mailing list