-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1374: Improve Glossaries links #1375
1374: Improve Glossaries links #1375
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we need the new container for the glossary links in
GlotPress/gp-templates/locale.php
Lines 32 to 36 in 30cbb90
<?php if ( $locale_glossary ) : ?> | |
<a href="<?php echo esc_url( gp_url_join( gp_url( '/languages' ), $locale->slug, $current_set_slug, 'glossary' ) ); ?>" class="glossary-link"><?php _e( 'Locale Glossary', 'glotpress' ); ?></a> | |
<?php elseif ( $can_create_locale_glossary ) : ?> | |
<a href="<?php echo esc_url( gp_url_join( gp_url( '/languages' ), $locale->slug, $current_set_slug, 'glossary' ) ); ?>" class="glossary-link"><?php _e( 'Create Locale Glossary', 'glotpress' ); ?></a> | |
<?php endif; ?> |
@ocean90 I'll leave the CSS minification for after your final review. |
Added the missing container. |
This PR uses the same logic that already exists to check if
$can_create_locale_glossary
to show alternative link, or hide Locale Glossary creation if none exist, and$can_approve
to show an alternative link or hide Project Locale creation if none exist.If both exist
If one don't exist, show the Create link
Fixes #1374
Feedback please!