View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001280 | Main CAcert Website | web of trust | public | 2014-05-14 22:09 | 2014-10-21 21:18 |
Reporter | alex | Assigned To | BenBE | ||
Priority | low | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Main CAcert Website | OS | N/A | OS Version | stable |
Product Version | 2014 Q2 | ||||
Target Version | 2014 Q3 | Fixed in Version | 2014 Q3 | ||
Summary | 0001280: WOT: Contact Assurer form does not print preferred language | ||||
Description | Contacting an assurer should be in the preferred language of the assurer or in the optionally given additional languages. But the preferred language is not printed and if no additional language is stated the user must guess out which language he should write in which could lead to confusion. | ||||
Steps To Reproduce | Main menu "CAcert Vertrauensnetzwerk" -> "Einen Assurer finden" -> (locate) -> Then in the list of WoT Assurers use function "E-Mail schreiben" to any participant. Practically it will turn out a link like https://secure.cacert.org/wot.php?id=9&userid=<number> and the resulting form will contain the line: "Sprache: <firstname> bevorzugt, auf angeschrieben zu werden." A given additional language will be printed, though, if exists. But to get in contact may lead to confusion due to not given preferred language. | ||||
Tags | No tags attached. | ||||
Reviewed by | NEOatNHNG, BenBE | ||||
Test Instructions | |||||
|
Propably caused by old/malfored data: users data from testserver (vm) contain languages like "de_DE", "en_AU" (column users.language) which do not get resolved to strings properly. (static php array in includes/lib/l10n.php:31). The array expects language codes like "de", "en", ... I expect such entries to exist on the production server, too. (but i cannot look) I don't know if such entries still get inserted. If they don't (or shouldn't) a solution would be to fix the database once. If they are still inserted, or if "locales" instead of languages are wanted, a additional database lookup would be required (table languages) |
|
Looking at the patch and the surroundings I see some trouble arising. Based on the $locales array in inc/lib/l10n.php we might translate to locales and thus to actual languages, but given we don't have all languages as an translateable string we'll unevitably end up with something like "User prefers being contacted in /العربية/" with the first part being translated into the user's interface language while the latter being in any other language. Although this problem pre-existed even before the patch one might consider to have this information in all user languages available so the string gets properly translated in all cases. The patch itself contains a minor glitch on zh_CN and zh_TW which would need to be mapped to zh-cn and zh-tw respectively. Inverting the information in the $locales array and falling back to simply truncating if not found there should solve this. |
|
I created a new commit, that uses the $locales array (after making it public), the commit also handles some other cases of which I am not sure, if and how often they appear in the database. (DE, ZH_CN, ZH_TW, .... ) |
|
Removed redundant code already present in the L10n class. Refactored the L10n class so that code is usable from outside. Please test & review. |
|
The last change is legit and reuses the already existing routine for normalization. |
|
User with such malformed data existed on the Testsystem with id: 171144 'de_DE' |
|
some more id to test 170910 'en_AU' 171036 'en_AU' 171050 'zh_CN' 171051 'pl_PL' To test go to find assurer. select anyone listed to write to and change the id in the URL. |
|
I tested all 4 ID above and got the selected languages => ok => ok |
|
I also tested the 4 IDs above and also got for all of them the desired language. => ok |
|
Test IDs 171931 => ok 170910 => ok 171036 => ok 171050 => ok 171051 => ok I also tested the 4 IDs above and also got for all of them the desired language. ==> ok |
|
The patch has been installed on the production server on July 16, 2014. See also: https://lists.cacert.org/wws/arc/cacert-systemlog/2014-07/msg00002.html |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-05-14 22:09 | alex | New Issue | |
2014-06-10 12:11 | felixd | Note Added: 0004814 | |
2014-06-10 12:44 | felixd | Relationship added | related to 0001283 |
2014-06-11 07:22 | BenBE | Note Added: 0004821 | |
2014-06-11 07:23 | BenBE | Status | new => needs work |
2014-06-11 15:23 | felixd | Note Added: 0004822 | |
2014-06-11 20:51 | BenBE | Reviewed by | => BenBE |
2014-06-11 20:51 | BenBE | Assigned To | => NEOatNHNG |
2014-06-11 20:51 | BenBE | Status | needs work => needs review & testing |
2014-06-11 20:51 | BenBE | Target Version | => 2014 Q2 |
2014-06-11 20:55 | BenBE | Source_changeset_attached | => cacert-devel testserver-stable a910c6bc |
2014-06-11 20:55 | felixd | Source_changeset_attached | => cacert-devel testserver-stable 6b1cd2a5 |
2014-06-11 20:55 | felixd | Source_changeset_attached | => cacert-devel testserver-stable 0730c9df |
2014-06-11 20:55 | felixd | Source_changeset_attached | => cacert-devel testserver-stable f3885b3b |
2014-06-21 17:20 | NEOatNHNG | Source_changeset_attached | => cacert-devel testserver-stable 340a1c8a |
2014-06-21 17:20 | NEOatNHNG | Source_changeset_attached | => cacert-devel testserver-stable da9630f0 |
2014-06-21 17:20 | NEOatNHNG | Source_changeset_attached | => cacert-devel testserver-stable 99f5de02 |
2014-06-21 17:20 | NEOatNHNG | Source_changeset_attached | => cacert-devel testserver-stable 5b192d09 |
2014-06-21 17:20 | NEOatNHNG | Source_changeset_attached | => cacert-devel testserver-stable 8fdd089f |
2014-06-21 17:20 | NEOatNHNG | Source_changeset_attached | => cacert-devel testserver-stable 5118f86c |
2014-06-21 17:25 | NEOatNHNG | Reviewed by | BenBE => NEOatNHNG |
2014-06-21 17:25 | NEOatNHNG | Note Added: 0004861 | |
2014-06-21 17:25 | NEOatNHNG | Assigned To | NEOatNHNG => BenBE |
2014-06-21 17:51 | BenBE | Reviewed by | NEOatNHNG => NEOatNHNG, BenBE |
2014-06-21 17:51 | BenBE | Note Added: 0004863 | |
2014-06-21 17:51 | BenBE | Status | needs review & testing => needs testing |
2014-06-24 20:55 | felixd | Note Added: 0004868 | |
2014-06-24 21:18 | INOPIAE | Note Added: 0004869 | |
2014-06-24 21:24 | INOPIAE | Note Edited: 0004869 | |
2014-06-24 21:24 | INOPIAE | Note Edited: 0004868 | |
2014-06-24 21:28 | INOPIAE | Note Edited: 0004869 | |
2014-06-24 21:29 | INOPIAE | Note Added: 0004870 | |
2014-06-29 11:22 | felixd | Note Added: 0004874 | |
2014-07-01 21:54 | MartinGummi | Note Added: 0004877 | |
2014-07-01 21:56 | MartinGummi | Status | needs testing => ready to deploy |
2014-07-01 21:56 | MartinGummi | Target Version | 2014 Q2 => 2014 Q3 |
2014-07-15 19:00 | BenBE | Source_changeset_attached | => cacert-devel release 73abf595 |
2014-07-16 10:46 | wytze | Note Added: 0004886 | |
2014-07-16 10:46 | wytze | Status | ready to deploy => solved? |
2014-07-16 10:46 | wytze | Fixed in Version | => 2014 Q3 |
2014-07-16 10:46 | wytze | Resolution | open => fixed |
2014-10-21 21:18 | INOPIAE | Status | solved? => closed |