Bug report #17395
Fields of memory layers are renamed automatically by the translation
|Affected QGIS version:||2.14.3||Regression?:||No|
|Operating System:||Ubuntu||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||no timely feedback|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||25292|
Steps to reproduce
Requires the german version of QGIS.
1. Create a vector memory layer through PyQGIS
2. Add a field named "id" via the dataProvider of the layer
3. Add the layer to the registry
4. Open the attribute table
Expected behaviour: A column named "id" is visible.
Observed behaviour: The column is named "Objektkennung". The actual field name is changed, too - e. g. if a script accesses a feature's attribute through `feature["id"]`, a KeyError is raised. The script has to use the field id instead to work consistently across machines.
This is quite dramatic, as it may unexpectedly wreck a lot of scripts and plugins that "work just fine" for the developer.