Skip to content
This repository was archived by the owner on Apr 6, 2020. It is now read-only.
This repository was archived by the owner on Apr 6, 2020. It is now read-only.

Localizable.strings can't contain comments #28

Description

@FredTheBishop

Fails to properly parse existing entries in Localizable.strings files that contain comments.

Patch LNLocalizationCollection.m, reloadLocalizations:

  1. regular expression ending ";$ better ending ";(.*)$ to allow any characters after terminator, before line ending.
  2. change the line:
    if (result.range.location != NSNotFound && result.numberOfRanges == 5) {
    to:
    if (result.range.location != NSNotFound && result.numberOfRanges >= 5) {
    because firstMatchInString: may return a range (no. 6) for the comments.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions