Added dash(-) as an allowed character for store code #1091
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allow dash in store code
Description (*)
Currently, it is not possible to create a store with a store code containing dash (-). When using the feature "add store code in url", this can lead to conflicts with SEO purposes.
There is a lot of literature (for example https://stackoverflow.com/a/2318376/7497291) on it and I am not a SEO specialist but what I know is that I have often been asked to add the dash in the store code and I had to rewrite this resource model. That's why I submit this PR.
Furthermore, the reason why dash is not allowed in Magento is not clear for me. The only answer I found is here :
https://magento.stackexchange.com/a/237309/50208
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
I am not sure it was necessary to create a Mage_Core_LTS.csv file : The text I changed is not used anymore in the source code, so I hesitated to modify directly the Mage_Core.csv file because it could be considered as dead code. But, if for some reason, somebody has specific code using this old key and need this old translated key, this will not break it. That's why I created a new csv file as suggested in the README.
Contribution checklist (*)