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

Rename formatters #1013

Merged
merged 3 commits into from
Apr 1, 2016
Merged

Rename formatters #1013

merged 3 commits into from
Apr 1, 2016

Conversation

tobiasdiez
Copy link
Member

The aim of this PR is to rename all formatters as discussed in #920.

Changes:

  • Remove Converter class which is superfluous with the improved formatter interface
  • Enable LatexToUnicode as formatter (previously it was only a LayoutFormatter)
  • Rename formatters (the key is always the class name without the Formatter suffix, a value in brackets indicates that I deviated from the last version in Table of formatters #920):

(I will add the necessary changes to the language files as soon as the names are accepted)

Format:

Authors related

  • AuthorsFormatter
    • classname: NormalizePersonNamesFormatter (NormalizeAuthorsFormatter)
    • name: normalize names of persons (normalize authors)
  • AuthorsMinifier
    • classname: MinifyPersonNamesFormatter (MinifyAuthorsFormatter)
    • name: Minify authors

Date related

  • MonthFormatter
    • classname: NormalizeMonthFormatter
    • name: normalize month
  • DateFormatter
    • classname: NormalizeDateFormatter
    • name: normalize date

Page related

  • PageNumbersFormatter
    • classname: NormalizePagesFormatter
    • name: normalize page numbers (normalize pages)

Casing related

  • TitleCaseChanger
    • classname: TitleCaseFormatter
    • name: title case (Titelize, EnforceTitleCaseFormatter)
  • UpperEachFirstCaseChanger
    • classname: CapitalizeFormatter
    • name: capitalize
  • UpperCaseChanger
    • classname: UpperCaseFormatter (UpcaseFormatter)
    • name: upper case (to upper case)
  • UpperFirstCaseChanger
    • classname: SentenceCaseFormatter (CapitalizeFirstDowncaseOthersFormatter)
    • name: sentence case (capitalize first, downcase others)
  • LowerCaseChanger
    • classname: LowerCaseFormatter (DowncaseFormatter)
    • name: lower case (to down case)
  • CaseKeeper
    • classname: ProtectCapitalsFormatter (FreezeTermsFormatter)
    • name: protect capitals (freeze terms)
  • RemoveBracesFormatter
    • key: RemoveBracesFormatter (UnfreezeWords)
    • name: remove enclosing braces (unfreeze words)
    • Note that this formatter only removes braces which enclose the whole field (e.g. "{test}" to "test"), but not "In {CDMA}" to "In CDMA")

LaTeX conversion

  • LatexFormatter
    • classname: LatexCleanupFormatter
    • name: LaTeX cleanup (remove LaTeX)
    • Note that this formatter does not remove all latex code, but just does some basic cleanup like combinding adjacent math environments)
  • HTMLToLatexFormatter
    • name: HTML to LaTeX
    • classname: HtmlToLatexFormatter
  • UnicodeToLatexFormatter
    • name: Unicode to LaTeX
    • classname: UnicodeToLatexFormatter
  • LatexToUnicodeFormatter
    • name: LaTeX to Unicode
    • classname: LatexToUnicodeFormatter
  • SuperscriptFormatter
    • classname: OrdinalsToLatexSuperscriptFormatter (OrdinalsToLatexFormatter)
    • name: ordinals to LaTeX superscript (ordinals to LaTeX)
  • UnitFormatter
    • classname: UnitsToLatexFormatter
    • name: units to LaTeX

Radical formatters

  • EraseFormatter
    • name: Clear
    • classname: ClearFormatter

  • Change in CHANGELOG.md described?
  • Tests created for changes?

@tobiasdiez tobiasdiez added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Mar 21, 2016
@tobiasdiez tobiasdiez added this to the v3.3 milestone Mar 21, 2016
@tobiasdiez
Copy link
Member Author

By the way, I would prefer to capitalize the first word in the name of the Formatters, i.e. ̀Normalize month`

@oscargus
Copy link
Contributor

I can only second starting the names with capital letters.

@koppor
Copy link
Member

koppor commented Mar 30, 2016

  • Examples have to be separated from the description, to prevent translations of them.
  • Examples should be stored as from and to.

@matthiasgeiger
Copy link
Member

... or examples should be in the form " from > to" - storing them independently is not neceessary.

@tobiasdiez
Copy link
Member Author

I merge this now in. Hopefully I got every name and description right...

@tobiasdiez tobiasdiez merged commit 70fd5bd into JabRef:master Apr 1, 2016
@tobiasdiez tobiasdiez deleted the formatterNames branch April 1, 2016 15:08
@mlep
Copy link
Contributor

mlep commented Apr 2, 2016

@tobiasdiez : Among the added localization strings, what does "Completely_the_field." means?

@tobiasdiez
Copy link
Member Author

@mlep Thanks for pointing out the strange description string. I fixed it in #1087.

@mlep
Copy link
Contributor

mlep commented Apr 3, 2016

@tobiasdiez Great. Thank you for tidying up JabRef Localizations.

@koppor koppor removed the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Apr 12, 2016
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

Successfully merging this pull request may close these issues.

5 participants