However, it only works properly if no extension is included ("defaultFileName": "Localization" as in the example in README). If extension is specified a file with double dot is generated. This is due to the
removingSuffix function only removing suffix.count-1 last characters of the string instead of suffix.count which I think is unexpected.
Hi guys 👋
This PR fixes a small bug which would generate
Localization..strings
file instead ofLocalization.strings
file when using the following configuration:The current setup seems to still support default file names with their extension included: https://github.com/AckeeCZ/ACKLocalization/blob/afd8e35a9d52c8f37f488921cf502b141547dd46/Sources/ACKLocalizationCore/ACKLocalization.swift#L206.
However, it only works properly if no extension is included (
"defaultFileName": "Localization"
as in the example in README). If extension is specified a file with double dot is generated. This is due to theremovingSuffix
function only removingsuffix.count-1
last characters of the string instead ofsuffix.count
which I think is unexpected.Checklist