I looked into this today and its unfortunately not easy. Dpkg send error messages localized over its status pipe, this means that apt gets the localized version of:
"trying to overwrite `%.250s', which is also in package %.250s"
the values in %.250s are filed in by dpkg.
So a string search is difficult as each language will be slightly different and dgettext("dpkg","trying to overwrite `%.250s', which is also in package %.250s"). I attach a string matcher that should work, but
I think it would be best to look for a better fix for this in dpkg itself.
Thanks for your bugreport.
I looked into this today and its unfortunately not easy. Dpkg send error messages localized over its status pipe, this means that apt gets the localized version of:
"trying to overwrite `%.250s', which is also in package %.250s"
the values in %.250s are filed in by dpkg.
So a string search is difficult as each language will be slightly different and dgettext( "dpkg", "trying to overwrite `%.250s', which is also in package %.250s"). I attach a string matcher that should work, but
I think it would be best to look for a better fix for this in dpkg itself.