File tree 1 file changed +6
-0
lines changed
app/src/main/java/fr/free/nrw/commons/mwapi
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -566,13 +566,19 @@ public List<Notification> getNotifications(boolean archived) {
566
566
}else {
567
567
notfilter = "!read" ;
568
568
}
569
+ String language =Locale .getDefault ().getLanguage ();
570
+ if (StringUtils .isNullOrWhiteSpace (language )){
571
+ //if no language is set we use the default user language defined on wikipedia
572
+ language ="user" ;
573
+ }
569
574
notificationNode = api .action ("query" )
570
575
.param ("notprop" , "list" )
571
576
.param ("format" , "xml" )
572
577
.param ("meta" , "notifications" )
573
578
.param ("notformat" , "model" )
574
579
.param ("notwikis" , "wikidatawiki|commonswiki|enwiki" )
575
580
.param ("notfilter" , notfilter )
581
+ .param ("uselang" , language )
576
582
.get ()
577
583
.getNode ("/api/query/notifications/list" );
578
584
} catch (IOException e ) {
You can’t perform that action at this time.
0 commit comments