dougwollison / nlingual

Versatile and flexible multilingual system for WordPress.
https://wordpress.org/plugins/nlingual/
GNU General Public License v2.0
13 stars 7 forks source link

Fix mo field size #4

Closed vianney closed 11 years ago

vianney commented 11 years ago

The translation strings for some languages are not loaded, because the database truncates the locale to 2 characters. This patch increases the field size to 5 characters (enough to accommodate for all locales in php/presets.php). Not sure how current databases should be upgraded (I have no experience with wordpress plugins).

In addition, I have also fixed some notice-level warnings about undefined variables/indexes, and one deprecation notice. This gives a cleaner output in Vagrantpress. Feel free to leave this commit out of the merge.

dougwollison commented 11 years ago

Wait, that wasn't the exact issue; mo was supposed to be VARCHAR(100) but I made a typo and assigned it the value for the iso field, which I had in there twice.

Re-fixed it. At this rate I should add a reset button that completely rebuilds the tables.

vianney commented 11 years ago

Good catch, I hadn't noticed the duplicate iso entry.