Skip to content
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

New reports don't use 'title_series_line2' variable but older examples do; could confuse some users #394

Closed
carlhiggs opened this issue Mar 15, 2024 · 0 comments

Comments

@carlhiggs
Copy link
Member

Describe the bug
If an older configuration file is used with newer code (enhancements branch) it can trip up if users don't modify example 'exception' citations, where reference is made to a phrase/variable 'title_series_line2'. This crashes the generate script, preventing a report being generated. The simple resolution is to put a check in the prepare_phrases() function, so if 'title_series_line2' is not defined, it can be defined as '-' which is pretty innocuous in a report title.

An example of an older excerpt of config yml that causes this issue is:

'citation_doi': '{local_collaborators_names}. 2022. {title_city} — {title_series_line1} {title_series_line2} ({city}, {country} — Healthy and Sustainable City Indicators Report: Comparisons with 25 cities internationally. {language} {translation}: {translation_names}). {city_doi}'

So in that context, with the fix an addition hyphen is included with a space on either side, seperating the report title and the city and country name.

This saves such users from having to modify their 'exception' citation, unless they want to.

carlhiggs added a commit that referenced this issue Mar 15, 2024
…ation text using a not currently defined/used phrase
@carlhiggs carlhiggs changed the title New reports don't use 'title_series_line2' variable but older examples too; could confuse some users New reports don't use 'title_series_line2' variable but older examples do; could confuse some users Mar 19, 2024
@carlhiggs carlhiggs mentioned this issue May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant