-
AuthorPosts
-
August 23rd, 2015 at 22:57 #33162nalajcie
After choosing ‘General font’ in theme settings, the translated string is being saved. The comparison in custom-style.php checks this against untranslated string and then puts the translated string into CSS as a result (for example “Czcionka podstawowa” in polish).
The patch to fix it:
diff --git a/wp-content/themes/nirvana/includes/custom-styles.php b/wp-content/themes/nirvana/includes/custom-styles.php index e7aa350..0593f66 100644 --- a/wp-content/themes/nirvana/includes/custom-styles.php +++ b/wp-content/themes/nirvana/includes/custom-styles.php @@ -98,21 +98,23 @@ $nirvana_googlefontwidget = cryout_gfontclean( esc_html($nirvana_googlefontwidge $nirvana_headingsgooglefont = cryout_gfontclean( esc_html($nirvana_headingsgooglefont), 2 );^M $nirvana_sitetitlegooglefont = cryout_gfontclean( esc_html($nirvana_sitetitlegooglefont), 2 );^M $nirvana_menugooglefont = cryout_gfontclean( esc_html($nirvana_menugooglefont), 2 );^M +^M +$general_font = __('General Font','nirvana');^M ?>^M body { font-family: <?php echo ((!$nirvana_googlefont)?$nirvana_fontfamily:"'$nirvana_googlefont'"); ?>; }^M #content h1.entry-title a, #content h2.entry-title a, #content h1.entry-title , #content h2.entry-title {^M - font-family: <?php echo ((!$nirvana_googlefonttitle)?(($nirvana_fonttitle == 'General Font')?'inherit':$nirvana_fonttitle):"'$nirvana_googlefonttitle'"); ?>; }^M + font-family: <?php echo ((!$nirvana_googlefonttitle)?(($nirvana_fonttitle == $general_font)?'inherit':$nirvana_fonttitle):"'$nirvana_googlefonttitle'"); ?>; }^M .widget-title, .widget-title a { line-height: normal;^M - font-family: <?php echo ((!$nirvana_googlefontside)?(($nirvana_fontside == 'General Font')?'inherit':$nirvana_fontside):"'$nirvana_googlefontside'"); ?>; }^M + font-family: <?php echo ((!$nirvana_googlefontside)?(($nirvana_fontside == $general_font)?'inherit':$nirvana_fontside):"'$nirvana_googlefontside'"); ?>; }^M .widget-container, .widget-container a {^M - font-family: <?php echo ((!$nirvana_googlefontwidget)?(($nirvana_fontwidget == 'General Font')?'inherit':$nirvana_fontwidget):"'$nirvana_googlefontwidget'"); ?>; }^M + font-family: <?php echo ((!$nirvana_googlefontwidget)?(($nirvana_fontwidget == $general_font)?'inherit':$nirvana_fontwidget):"'$nirvana_googlefontwidget'"); ?>; }^M .entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6, #comments #reply-title,^M .nivo-caption h2, #front-text1 h1, #front-text2 h1, h3.column-header-image {^M - font-family: <?php echo ((!$nirvana_headingsgooglefont)?(($nirvana_headingsfont == 'General Font')?'inherit':$nirvana_headingsfont):"'$nirvana_headingsgooglefont'"); ?>; }^M + font-family: <?php echo ((!$nirvana_headingsgooglefont)?(($nirvana_headingsfont == $general_font)?'inherit':$nirvana_headingsfont):"'$nirvana_headingsgooglefont'"); ?>; }^M #site-title span a {^M - font-family: <?php echo ((!$nirvana_sitetitlegooglefont)?(($nirvana_sitetitlefont == 'General Font')?'inherit':$nirvana_sitetitlefont):"'$nirvana_sitetitlegooglefont'"); ?>; }^M + font-family: <?php echo ((!$nirvana_sitetitlegooglefont)?(($nirvana_sitetitlefont == $general_font)?'inherit':$nirvana_sitetitlefont):"'$nirvana_sitetitlegooglefont'"); ?>; }^M #access ul li a, #access ul li a span {^M - font-family: <?php echo ((!$nirvana_menugooglefont)?(($nirvana_menufont == 'General Font')?'inherit':$nirvana_menufont):"'$nirvana_menugooglefont'"); ?>; }^M + font-family: <?php echo ((!$nirvana_menugooglefont)?(($nirvana_menufont == $general_font)?'inherit':$nirvana_menufont):"'$nirvana_menugooglefont'"); ?>; }^M ^M <?php^M ////////// COLORS //////////^M
September 3rd, 2015 at 11:40 #33229ZedCryout Creations mastermindThanks for pointing out this issue, however there is an easier fix: changing
<option value="<?php echo $general; ?>"><?php echo $general; ?></option>
to
<option value="General Font"><?php echo $general; ?></option>
in admin/prototypes.phpThis will be fixed in the next update.
If you like our creations, help us share by rating them on WordPress.org.
Please check the available documentation and search the forums before starting a topic. -
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
The topic ‘Font settings broken when using localizations’ is closed to new replies.