Bug report #8453

QgsExpression::Interval::fromString() doesn't fully support plural forms for certain languages

Added by artfwo - about 11 years ago. Updated over 10 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:-
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:17222

Description

QgsExpression::Interval::fromString() found in src/core/qgsexpression.cpp currently supports localized intervals, but only parses singular and plural forms for every known interval, e.g. month/months or year/years.

Certain languages such as Polish and Russian use additional forms of nouns with the numerals 2, 3 or 4 (and higher numbers ending with these), having 3 forms of the above nouns, for example: 1 день, 2 дня, 5 дней. Other languages can have different systems as well.

Current implementation also parses non-localized intervals, but only parses the singular form of those and that should be probably fixed too.

Associated revisions

Revision a63ddd2e
Added by Jürgen Fischer over 10 years ago

expression interval fixes:
  • allow more than two translated forms (fixes #8453)
  • support signed floating point values
  • allow non-ascii characters in translation strings

History

#1 Updated by Jürgen Fischer over 10 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF