-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show Tibet as part of China on map #11930
Conversation
@Findus23 We need to remove the flag for Tibet as soon as this gets merged in order to get the tests fixed |
I hope this doesn't get merged. |
@gameblabla Hi, had your used a map? such as Google map, Bing map or Apple map, the last commit about "free tibet" was a joke! |
@phodal, i know them but i do not get your point. |
@gameblabla Tibet belongs to China, and there is no dispute |
@fxzjshm There's no need to be hostile, i'm trying to find a good compromise. There are people who agree with you and there are people who don't agree. I believe piwik should not be one-sided. @sgiehl, forgive me but is my idea okay with you ? This might help with the "Unknown" stuff without breaking things. (i admit i know very little php) |
@gameblabla, did any country recognized Tibet was a country ? America? England ? France? If so, could you list the country name ? May be for now, India thought Tibet was a country? Because a lot of Indian army was within Chinese borders. Are you come from India, just prepare discuss the disputed territory side of China? I remember in 1906, according to Convention Between Great Britain and China Respecting Tibet . The Government of China also undertakes not to permit any other foreign State to interfere with the territory or internal administration of Tibet. So please don't permit interfere with the territory or internal administration of Tibet. |
I'm not sure if this is the place to discuss about this but i will anyway. |
@gameblabla There's no point to discuss historical claims on this. The Taiwan Authority of China claims Outer-Mongolia until 2002, then should we prepare an addition map that has Mongolia inside China? If we don't build map base on the current situation, then I'm sure we need to build hundreds of maps. Like how about a map for the empire that sun never sets? Or a map for the Mongol Empire? No, that's not cool. |
@fengkaijia, the difference is that no one claims the territory for the "Mongol Empire" or "the empire that sun never sets" whereas it's different with Tibet, even now. That's not counting Australia welcoming tibetan refugees. Ultimately, it's up to piwik's devs to decide if they should go ahead with the merge or not. |
@gameblabla No no you are mixing up with the refugee concept. The Russian welcomed Edward Snowden, it doesn't mean Russia claimed the US territory. Tibet is a part of China, that's what Australia claims:
|
@fengkaijia, yes you're right, i wasn't denying that. But still, i was pointing out that some people (including tibetans in australia) still do not agree with China on this. I'll let the devs decide on this. |
There is only one reason why we will change this. We want to show a map that matches other maps of analytics tools like Google Analytics and others. So there won't be any reason in the future to discuss stuff like that. Sure, there might still be some stuff incorrect, but this one can be changed by reverting an old commit, while other changes aren't easily possible without #11929 |
hey,fuck your mum |
I understand the technical reasons. If this PR gets merged, then most likely you'll get more issues about Taiwan and (eventually) Hong Kong. I do wonder what @mattab think of this? He was the one who made the original commit after all. |
@gameblabla I didn't mean Piwik wants to become like Google Analytics. |
Fine then, i will not insist further. I am considering a fork. |
Remaining failing tests should be fixed as soon as flag was removed from piwik/icons |
@sgiehl I just sent a PR matomo-org/matomo-icons#14 to remove the flag. |
Plus, I wonder if the UserCounty is applied for old visit, plugins/UserCountry/Visitor.php shall also be changed. And the Archive reader, oh that sounds like a very complicated job. |
@fengkaijia's pull request is merged and reflected in #11904 |
This reverts commit 4e47c8a.
plugins/UserCountry/API.php
Outdated
@@ -75,6 +82,14 @@ public function getRegion($idSite, $period, $date, $segment = false) | |||
$separator = Archiver::LOCATION_SEPARATOR; | |||
$unk = Visit::UNKNOWN_CODE; | |||
|
|||
// show visits tracked as Tibet as region of China | |||
$dataTable->filter('GroupBy', array('label', function($label) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As those GroupBy
filters are quite slow I wonder if we could maybe remove this again in Piwik 4 and somehow mention this in an issue or so? Or maybe we could have first a simple check whether there is actually any row containing this label? Like if($dataTable->getRowFromLabel('1|ti')) { ... groupby filter...}
Same could be done in countries. This would not check lowercase but don't know if we actually have it in different cases in the DB?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking if an entry exists before adding the group by filters should work, will test that.
Removing in Piwik 4 might not be that easy. We could add an update script to update all entries in log_visit table (which I would do in next major release only as it might run a bit longer), so we can remove some of the checks for visitor log & profile, but the group by would still be required if the archived reports aren't reprocessed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is fine to leave it in there as long as we do the check if table has the row at all.
@@ -22,6 +22,10 @@ | |||
*/ | |||
function getFlagFromCode($code) | |||
{ | |||
if (strtolower($code) == 'ti') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wondering if this is still needed after moving ti
to cn
? Or is it just a fallback?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see... it might be for visitor log or so
@@ -1355,10 +1355,10 @@ | |||
$.extend(UserCountryMap, { | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Map seems to still work 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd only try to improve the GroupBy to do it only when needed and when the table actually contains such a label, will improve performance a bit as groupBy can take a bit of time (in this case it wouldn't take too long as it would not actually group many, but be still quite a bit faster and take less memory etc). Otherwise good to merge.
Last changes weren't compatible with Datatable Maps. Just pushed an update. Let's see if all tests pass now and then we can finally merge |
👍 |
'label', | ||
function ($label) { | ||
if ($label == '1|ti') { | ||
return 'cn'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sgiehl Thanks for the merge. Should the return value be 14|cn
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure. I'll fix that typo
Chinese pressure is so big that no one can resist it seems. Say they conquer korea and japan today like they did the massacre in Tibet, next year piwik will update the new map with the new "chinese territories" :) |
This Pull Request is not yet complete.
There might be still some places where old data might be shown as "Unknown" now.
And as old visits won't be changed, segments for showing visits from Tibet might have incorrect results, need to check if there is an easy way to handle that.
fixes #6006