Merge remote-tracking branch 'upstream/master' into upstream-release
This commit is contained in:
commit
efe41f407e
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:state_selected="true" android:drawable="@drawable/ic_fluent_arrow_repeat_all_24_filled"/>
|
||||||
<item android:state_enabled="true" android:drawable="@drawable/ic_fluent_arrow_repeat_all_24_regular"/>
|
<item android:state_enabled="true" android:drawable="@drawable/ic_fluent_arrow_repeat_all_24_regular"/>
|
||||||
<item android:drawable="@drawable/ic_fluent_arrow_repeat_all_off_24_regular"/>
|
<item android:drawable="@drawable/ic_fluent_arrow_repeat_all_off_24_regular"/>
|
||||||
</selector>
|
</selector>
|
|
@ -0,0 +1,3 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
|
||||||
|
<path android:pathData="M14.712 2.289L14.625 2.21c-0.392-0.31-0.964-0.285-1.327 0.078L13.22 2.376c-0.31 0.392-0.285 0.964 0.078 1.326l1.299 1.297H8.999L8.76 5.003C5.004 5.13 2 8.211 2 11.993c0 1.445 0.438 2.788 1.189 3.899C3.37 16.143 3.666 16.307 4 16.307c0.552 0 1-0.448 1-1 0-0.216-0.069-0.416-0.185-0.578L4.68 14.51C4.248 13.77 4 12.91 4 11.993c0-2.759 2.238-4.995 5-4.995h5.595l-1.297 1.297-0.078 0.087c-0.31 0.392-0.285 0.964 0.078 1.326 0.39 0.39 1.024 0.39 1.414 0l3.006-3.003 0.077-0.087c0.311-0.392 0.285-0.964-0.078-1.326l-3.005-3.003zm6.075 5.771C20.602 7.827 20.319 7.678 20 7.678c-0.552 0-1 0.448-1 1 0 0.208 0.064 0.4 0.172 0.56 0.523 0.79 0.828 1.737 0.828 2.755 0 2.76-2.238 4.996-5 4.996H9.416l1.294-1.292 0.083-0.095c0.281-0.361 0.28-0.871-0.006-1.23l-0.077-0.088-0.095-0.084c-0.362-0.28-0.873-0.278-1.232 0.006l-0.088 0.078-3.005 3.003-0.083 0.095c-0.281 0.361-0.28 0.872 0.006 1.231L6.289 18.7l3.005 3.003 0.095 0.084c0.392 0.304 0.96 0.277 1.32-0.084 0.362-0.362 0.388-0.933 0.077-1.326L10.71 20.29l-1.304-1.303h5.596l0.24-0.003C18.996 18.857 22 15.776 22 11.994c0-1.46-0.448-2.816-1.213-3.937V8.06z" android:fillColor="@color/fluent_default_icon_tint"/>
|
||||||
|
</vector>
|
|
@ -1,43 +1,40 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<locale-config xmlns:android="http://schemas.android.com/apk/res/android">
|
<locale-config xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<locale android:name="en" />
|
<locale android:name="ar-SA"/>
|
||||||
<locale android:name="ar" />
|
<locale android:name="bn-BD"/>
|
||||||
<locale android:name="bn-BD"/>
|
<locale android:name="bs-BA"/>
|
||||||
<locale android:name="bs" />
|
<locale android:name="ca-ES"/>
|
||||||
<locale android:name="ca" />
|
<locale android:name="cs-CZ"/>
|
||||||
<locale android:name="cs" />
|
<locale android:name="de-DE"/>
|
||||||
<locale android:name="de" />
|
<locale android:name="el-GR"/>
|
||||||
<locale android:name="gd-GB"/>
|
<locale android:name="en"/>
|
||||||
<locale android:name="el" />
|
<locale android:name="es-ES"/>
|
||||||
<locale android:name="es" />
|
<locale android:name="eu-ES"/>
|
||||||
<locale android:name="eu" />
|
<locale android:name="fi-FI"/>
|
||||||
<locale android:name="fi" />
|
<locale android:name="fr-FR"/>
|
||||||
<locale android:name="fr" />
|
<locale android:name="gd-GB"/>
|
||||||
<loacle android:name="sl"/>
|
<locale android:name="gl-ES"/>
|
||||||
<locale android:name="gl" />
|
<locale android:name="hi-IN"/>
|
||||||
<locale android:name="hi-IN"/>
|
<locale android:name="hr-HR"/>
|
||||||
<locale android:name="hr" />
|
<locale android:name="hy-AM"/>
|
||||||
<locale android:name="hy" />
|
<locale android:name="in-ID"/>
|
||||||
<locale android:name="id"/>
|
<locale android:name="it-IT"/>
|
||||||
<locale android:name="it" />
|
<locale android:name="iw-IL"/>
|
||||||
<locale android:name="iw" />
|
<locale android:name="ja-JP"/>
|
||||||
<locale android:name="ja" />
|
<locale android:name="kab"/>
|
||||||
<locale android:name="kab" />
|
<locale android:name="ko-KR"/>
|
||||||
<locale android:name="ko" />
|
<locale android:name="nl-NL"/>
|
||||||
<locale android:name="nl"/>
|
<locale android:name="oc-FR"/>
|
||||||
<locale android:name="oc" />
|
<locale android:name="pl-PL"/>
|
||||||
<locale android:name="pl" />
|
<locale android:name="pt-BR"/>
|
||||||
<locale android:name="pt-BR" />
|
<locale android:name="pt-PT"/>
|
||||||
<locale android:name="pt-PT" />
|
<locale android:name="ru-RU"/>
|
||||||
<locale android:name="ro"/>
|
<locale android:name="si-LK"/>
|
||||||
<locale android:name="ru" />
|
<locale android:name="sv-SE"/>
|
||||||
<locale android:name="si-LK"/>
|
<locale android:name="th-TH"/>
|
||||||
<locale android:name="sl"/>
|
<locale android:name="tr-TR"/>
|
||||||
<locale android:name="sv" />
|
<locale android:name="uk-UA"/>
|
||||||
<locale android:name="th" />
|
<locale android:name="vi-VN"/>
|
||||||
<locale android:name="tr" />
|
<locale android:name="zh-CN"/>
|
||||||
<locale android:name="uk" />
|
<locale android:name="zh-TW"/>
|
||||||
<locale android:name="vi" />
|
|
||||||
<locale android:name="zh-Hans" />
|
|
||||||
<locale android:name="zh-Hant" />
|
|
||||||
</locale-config>
|
</locale-config>
|
|
@ -0,0 +1,44 @@
|
||||||
|
// Run: java tools/GenerateLocaleConfig.java
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.OutputStreamWriter;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
|
||||||
|
public class GenerateLocaleConfig{
|
||||||
|
public static void main(String[] args) throws IOException{
|
||||||
|
File dir=new File("../mastodon/src/main/res/");
|
||||||
|
if(!dir.exists())
|
||||||
|
dir=new File("mastodon/src/main/res");
|
||||||
|
if(!dir.exists())
|
||||||
|
throw new RuntimeException("Please run from project directory (can't find mastodon/src/main/res)");
|
||||||
|
|
||||||
|
ArrayList<String> locales=new ArrayList<>();
|
||||||
|
locales.add("en");
|
||||||
|
|
||||||
|
for(File file:dir.listFiles()){
|
||||||
|
String name=file.getName();
|
||||||
|
if(file.isDirectory() && name.startsWith("values-")){
|
||||||
|
if(new File(file, "strings.xml").exists()){
|
||||||
|
locales.add(name.substring(name.indexOf('-')+1).replace("-r", "-"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
locales.sort(String::compareTo);
|
||||||
|
try(OutputStreamWriter writer=new OutputStreamWriter(new FileOutputStream(new File(dir, "xml/locales_config.xml")), StandardCharsets.UTF_8)){
|
||||||
|
writer.write("""
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<locale-config xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
""");
|
||||||
|
for(String locale : locales){
|
||||||
|
writer.write("\t<locale android:name=\"");
|
||||||
|
writer.write(locale);
|
||||||
|
writer.write("\"/>\n");
|
||||||
|
}
|
||||||
|
writer.write("</locale-config>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue