• Hi, I am considering the use of recipe press for my language. There is no difference in singular or plural counting in my language, and when I add some thing for ingridients which has more than two (like 2 onion, or 100 Gram etc), recipe press adds a S at the end and changes them to (2 onions, or 100 Grams). I know in english it is the way to write, but it realy is annoying to see them in my language. In a language, like arabic, there is no way to understand the added s at the end of any word!

    – How can I remove it from the codes?
    Or
    – how to prevent it from being exacuted at first polace.

    Regards

    https://www.ads-software.com/extend/plugins/recipe-press/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Travers

    (@traversvanlieropcomau)

    I have just spent the better part of this afternoon doing exactly this. My ‘sizes’ are in g, kg, etc and needed the exact same thing.

    There are two ways you can do this.

    1. Edit wp-content/plugins/recipe-press/includes/template_tags.php.

    Find the line with “/* Convert size to plural if more than one */” (approx line 366) and comment out the if statement (5 lines worth). This will make the size display as you have entered it in the size settings. Only down side to this, it will not then ‘fix’ pluralisation when size is something like “cup”.

    2. Edit /wp-content/plugins/recipe-press/includes/inflector.php

    Add the terms you do not want to be pluralised into the array generated by “static function cacheUncountable()”. You can also use the static function cacheIrregular() in a similar way.

    Option 2 means that you can still have pluralisation being used, but only on items that then make sense.

    Hope this helps. I know my recipes now make more sense.

    Cheers,
    Trav

    Thread Starter ashchi

    (@ashchi)

    Hi Trav,

    And, a very big thank for you for solving this for me. I followed your 1st direction and now am happy to say that every thing works as I wanted.

    Regards

    Remember that doing either option will get overwritten when the plugin is upgraded.

    Thread Starter ashchi

    (@ashchi)

    Hi curtismchale,

    Will remember if new version is out.

    Regards

    Travers

    (@traversvanlieropcomau)

    Yeah, I should be more diligent when writing my instructions – I tend to assume that if you want to hake code you would know that it gets overwritten when you upgrade plugins, themes, etc.

    I keep a top level folder outside public_html with copie of modified files (as my own backup) and also a “mods_log” text file which pretty much has instructions on what to look for for my changes and the actual change matching the version of plugin/theme…but that’s the Architect/Engineer in me taking control of me ??

    Good luck all, and hopefully the great support for this wonderful app will continue after grandslambert moves on…

    Trav

    We’ve added a setting for enabling/disabling pluralization and singularization of ingredients and serving sizes. It will be included in the next update (coming soon), but for now you can get it by checking out the plugin from SVN here:

    https://code.google.com/p/recipe-press/source/checkout

    Devin

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: RecipePress] How to delete the plural S in ingidients?’ is closed to new replies.