Opened 13 years ago
Closed 9 years ago
#21204 closed defect (bug) (worksforme)
Encoding problem with errors and warnings
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.4.1 |
Component: | I18N | Keywords: | |
Focuses: | Cc: |
Description
There are several functions for debugging and their messages are also localized. For example _deprecated_argument(), _doing_it_wrong(), etc. But when these functions are fired, encoding of the whole administration (not only error messages) is damaged (see attached screenshot).
It is not very good because even if debugging is turned off, some errors can be still triggered - for example trigger_error() in ms_subdomain_constants() function, etc.
Attachments (1)
Change History (14)
#2
@
13 years ago
Hard to say... In some cases it would be better, developers usually understand basic error in English and they can find solution easily in English. But in some cases are errors descriptive and can help users understand current problem...
But problem is not only in error messages. Encoding is broken for the whole administration - navigation bar, menu, etc.
#3
@
13 years ago
But problem is not only in error messages. Encoding is broken for the whole administration - navigation bar, menu, etc.
Sure, but perhaps we are tripping up your error handler, causing encoding issues throughout the admin. If the errors were rendered in English (say, if you remove __
from them), do you still have broken encoding for the entire admin?
Looks like you are using XDebug — could this be particular to your setup, not even general PHP?
#4
in reply to:
↑ 1
@
13 years ago
Replying to nacin:
Would it make more sense if we just never translated these kinds of developer error messages?
+1. It would also be easier to find more information about the errors (web search?) if they are not translated.
#5
@
13 years ago
nacin: Thank you and sorry for bothering you. It was really related to XDebug, after disabling XDebug everything works well. You can close the ticket or let it open with different meaning "translate or not to translate error messages".
Pros:
- Better (web)search possibilities for English strings.
- Translators are not developers - they can translate strings with different meaning.
- Less strings to translate, less memory used, etc.
Cons:
- Translated strings can help users (non-developers) to identify problem (if translation is really good and descriptive).
Maybe messages can be available for translation, but with note for translators "Information for developers, translate only when really needed".
#6
@
13 years ago
Strange, there are encoding problems only for some messages...
1) Function ms_subdomain_constants() use trigger_error() and _deprecated_argument(). Everything works, encoding is OK for messages and the whole administration.
2) But using for example deprecated plugin header (Site Wide Only: true) leads to encoding problems with messages and the whole administration on Plugins page. This problem can be seen even if localized version is deactivated, because there is for example website name in non-english language.
Would it make more sense if we just never translated these kinds of developer error messages?