mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-26 14:21:16 +00:00
Rename Repository -> Folder, Node -> Device.
This commit is contained in:
parent
3b0167ff59
commit
e7fb1c08ec
45 changed files with 1219 additions and 1214 deletions
|
@ -41,7 +41,7 @@ public class MockRestApi extends RestApi {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Node> getNodes() {
|
public List<Device> getDevices() {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ public class MockRestApi extends RestApi {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Repo> getRepos() {
|
public List<Folder> getFolders() {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,42 +61,42 @@ public class MockRestApi extends RestApi {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getModel(final String repoId, final OnReceiveModelListener listener) {
|
public void getModel(final String folderId, final OnReceiveModelListener listener) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void editNode(Node node, Activity activity, OnNodeIdNormalizedListener listener) {
|
public void editDevice(Device device, Activity activity, OnDeviceIdNormalizedListener listener) {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean deleteNode(Node node, Activity activity) {
|
public boolean deleteDevice(Device device, Activity activity) {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean editRepo(Repo repo, boolean create, Activity activity) {
|
public boolean editFolder(Folder folder, boolean create, Activity activity) {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean deleteRepo(Repo repo, Activity activity) {
|
public boolean deleteFolder(Folder folder, Activity activity) {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void normalizeNodeId(String id, final OnNodeIdNormalizedListener listener) {
|
public void normalizeDeviceId(String id, final OnDeviceIdNormalizedListener listener) {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@TargetApi(11)
|
@TargetApi(11)
|
||||||
public void copyNodeId(String id) {
|
public void copyDeviceId(String id) {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRepoFileChange(String repoId, String relativePath) {
|
public void onFolderFileChange(String folderId, String relativePath) {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,8 +4,8 @@ import android.test.ActivityInstrumentationTestCase2;
|
||||||
import android.test.suitebuilder.annotation.SmallTest;
|
import android.test.suitebuilder.annotation.SmallTest;
|
||||||
|
|
||||||
import com.nutomic.syncthingandroid.activities.MainActivity;
|
import com.nutomic.syncthingandroid.activities.MainActivity;
|
||||||
import com.nutomic.syncthingandroid.fragments.NodesFragment;
|
import com.nutomic.syncthingandroid.fragments.DevicesFragment;
|
||||||
import com.nutomic.syncthingandroid.fragments.ReposFragment;
|
import com.nutomic.syncthingandroid.fragments.FoldersFragment;
|
||||||
import com.nutomic.syncthingandroid.syncthing.SyncthingServiceBinder;
|
import com.nutomic.syncthingandroid.syncthing.SyncthingServiceBinder;
|
||||||
import com.nutomic.syncthingandroid.test.MockSyncthingService;
|
import com.nutomic.syncthingandroid.test.MockSyncthingService;
|
||||||
|
|
||||||
|
@ -21,8 +21,8 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv
|
||||||
public void testOnServiceConnected() {
|
public void testOnServiceConnected() {
|
||||||
getActivity().onServiceConnected(null, new SyncthingServiceBinder(mService));
|
getActivity().onServiceConnected(null, new SyncthingServiceBinder(mService));
|
||||||
assertTrue(mService.containsListenerInstance(MainActivity.class));
|
assertTrue(mService.containsListenerInstance(MainActivity.class));
|
||||||
assertTrue(mService.containsListenerInstance(ReposFragment.class));
|
assertTrue(mService.containsListenerInstance(FoldersFragment.class));
|
||||||
assertTrue(mService.containsListenerInstance(NodesFragment.class));
|
assertTrue(mService.containsListenerInstance(DevicesFragment.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ public class RestApiTest extends AndroidTestCase {
|
||||||
getContext().getApplicationInfo().dataDir + "/" + SyncthingService.BINARY_NAME);
|
getContext().getApplicationInfo().dataDir + "/" + SyncthingService.BINARY_NAME);
|
||||||
|
|
||||||
mConfig = new ConfigXml(new MockContext(getContext()));
|
mConfig = new ConfigXml(new MockContext(getContext()));
|
||||||
mConfig.createCameraRepo();
|
mConfig.createCameraFolder();
|
||||||
mConfig.updateIfNeeded();
|
mConfig.updateIfNeeded();
|
||||||
|
|
||||||
final CountDownLatch latch = new CountDownLatch(2);
|
final CountDownLatch latch = new CountDownLatch(2);
|
||||||
|
@ -76,8 +76,8 @@ public class RestApiTest extends AndroidTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SmallTest
|
@SmallTest
|
||||||
public void testGetNodes() {
|
public void testGetDevices() {
|
||||||
assertNotNull(mApi.getNodes());
|
assertNotNull(mApi.getDevices());
|
||||||
}
|
}
|
||||||
|
|
||||||
@MediumTest
|
@MediumTest
|
||||||
|
@ -94,8 +94,8 @@ public class RestApiTest extends AndroidTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SmallTest
|
@SmallTest
|
||||||
public void testGetRepos() {
|
public void testGetFolders() {
|
||||||
assertNotNull(mApi.getRepos());
|
assertNotNull(mApi.getFolders());
|
||||||
}
|
}
|
||||||
|
|
||||||
@SmallTest
|
@SmallTest
|
||||||
|
@ -128,7 +128,7 @@ public class RestApiTest extends AndroidTestCase {
|
||||||
final CountDownLatch latch = new CountDownLatch(1);
|
final CountDownLatch latch = new CountDownLatch(1);
|
||||||
mApi.getModel("camera", new RestApi.OnReceiveModelListener() {
|
mApi.getModel("camera", new RestApi.OnReceiveModelListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onReceiveModel(String repoId, RestApi.Model model) {
|
public void onReceiveModel(String folderId, RestApi.Model model) {
|
||||||
assertNotNull(model);
|
assertNotNull(model);
|
||||||
latch.countDown();
|
latch.countDown();
|
||||||
}
|
}
|
||||||
|
@ -137,12 +137,12 @@ public class RestApiTest extends AndroidTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@MediumTest
|
@MediumTest
|
||||||
public void testNormalizeNodeId() throws InterruptedException {
|
public void testNormalizeDeviceId() throws InterruptedException {
|
||||||
final CountDownLatch latch = new CountDownLatch(1);
|
final CountDownLatch latch = new CountDownLatch(1);
|
||||||
mApi.normalizeNodeId("p56ioi7m--zjnu2iq-gdr-eydm-2mgtmgl3bxnpq6w5btbbz4tjxzwicq",
|
mApi.normalizeDeviceId("p56ioi7m--zjnu2iq-gdr-eydm-2mgtmgl3bxnpq6w5btbbz4tjxzwicq",
|
||||||
new RestApi.OnNodeIdNormalizedListener() {
|
new RestApi.OnDeviceIdNormalizedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onNodeIdNormalized(String normalizedId, String error) {
|
public void onDeviceIdNormalized(String normalizedId, String error) {
|
||||||
assertEquals("P56IOI7-MZJNU2Y-IQGDREY-DM2MGTI-MGL3BXN-PQ6W5BM-TBBZ4TJ-XZWICQ2",
|
assertEquals("P56IOI7-MZJNU2Y-IQGDREY-DM2MGTI-MGL3BXN-PQ6W5BM-TBBZ4TJ-XZWICQ2",
|
||||||
normalizedId);
|
normalizedId);
|
||||||
latch.countDown();
|
latch.countDown();
|
||||||
|
|
|
@ -41,16 +41,16 @@ public class ConfigXmlTest extends AndroidTestCase {
|
||||||
* This is not ideal, but way less complicated than starting up syncthing and accessing the API.
|
* This is not ideal, but way less complicated than starting up syncthing and accessing the API.
|
||||||
*/
|
*/
|
||||||
@SmallTest
|
@SmallTest
|
||||||
public void testCreateCameraRepo() {
|
public void testCreateCameraFolder() {
|
||||||
long oldTime = ConfigXml.getConfigFile(mContext).lastModified();
|
long oldTime = ConfigXml.getConfigFile(mContext).lastModified();
|
||||||
long oldSize = ConfigXml.getConfigFile(mContext).length();
|
long oldSize = ConfigXml.getConfigFile(mContext).length();
|
||||||
mConfig.createCameraRepo();
|
mConfig.createCameraFolder();
|
||||||
assertNotSame(oldTime, ConfigXml.getConfigFile(mContext).lastModified());
|
assertNotSame(oldTime, ConfigXml.getConfigFile(mContext).lastModified());
|
||||||
assertNotSame(oldSize, ConfigXml.getConfigFile(mContext).lastModified());
|
assertNotSame(oldSize, ConfigXml.getConfigFile(mContext).lastModified());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Same as {@link #testCreateCameraRepo()}.
|
* Same as {@link #testCreateCameraFolder()}.
|
||||||
*/
|
*/
|
||||||
@MediumTest
|
@MediumTest
|
||||||
public void testUpdateIfNeeded() {
|
public void testUpdateIfNeeded() {
|
||||||
|
|
|
@ -7,16 +7,16 @@ import android.widget.TextView;
|
||||||
|
|
||||||
import com.nutomic.syncthingandroid.R;
|
import com.nutomic.syncthingandroid.R;
|
||||||
import com.nutomic.syncthingandroid.syncthing.RestApi;
|
import com.nutomic.syncthingandroid.syncthing.RestApi;
|
||||||
import com.nutomic.syncthingandroid.util.NodesAdapter;
|
import com.nutomic.syncthingandroid.util.DevicesAdapter;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
public class NodesAdapterTest extends AndroidTestCase {
|
public class DevicesAdapterTest extends AndroidTestCase {
|
||||||
|
|
||||||
private NodesAdapter mAdapter;
|
private DevicesAdapter mAdapter;
|
||||||
|
|
||||||
private RestApi.Node mNode = new RestApi.Node();
|
private RestApi.Device mDevice = new RestApi.Device();
|
||||||
|
|
||||||
private RestApi.Connection mConnection = new RestApi.Connection();
|
private RestApi.Connection mConnection = new RestApi.Connection();
|
||||||
|
|
||||||
|
@ -24,10 +24,10 @@ public class NodesAdapterTest extends AndroidTestCase {
|
||||||
protected void setUp() throws Exception {
|
protected void setUp() throws Exception {
|
||||||
super.setUp();
|
super.setUp();
|
||||||
|
|
||||||
mAdapter = new NodesAdapter(getContext());
|
mAdapter = new DevicesAdapter(getContext());
|
||||||
mNode.Addresses = "127.0.0.1:12345";
|
mDevice.Addresses = "127.0.0.1:12345";
|
||||||
mNode.Name = "the node";
|
mDevice.Name = "the device";
|
||||||
mNode.NodeID = "123-456-789";
|
mDevice.DeviceID = "123-456-789";
|
||||||
|
|
||||||
mConnection.Completion = 100;
|
mConnection.Completion = 100;
|
||||||
mConnection.InBits = 1048576;
|
mConnection.InBits = 1048576;
|
||||||
|
@ -37,11 +37,11 @@ public class NodesAdapterTest extends AndroidTestCase {
|
||||||
|
|
||||||
@MediumTest
|
@MediumTest
|
||||||
public void testGetViewNoConnections() {
|
public void testGetViewNoConnections() {
|
||||||
mAdapter.add(Arrays.asList(mNode));
|
mAdapter.add(Arrays.asList(mDevice));
|
||||||
View v = mAdapter.getView(0, null, null);
|
View v = mAdapter.getView(0, null, null);
|
||||||
|
|
||||||
assertEquals(mNode.Name, ((TextView) v.findViewById(R.id.name)).getText());
|
assertEquals(mDevice.Name, ((TextView) v.findViewById(R.id.name)).getText());
|
||||||
assertEquals(getContext().getString(R.string.node_disconnected),
|
assertEquals(getContext().getString(R.string.device_disconnected),
|
||||||
((TextView) v.findViewById(R.id.status)).getText().toString());
|
((TextView) v.findViewById(R.id.status)).getText().toString());
|
||||||
assertFalse(((TextView) v.findViewById(R.id.status)).getText().equals(""));
|
assertFalse(((TextView) v.findViewById(R.id.status)).getText().equals(""));
|
||||||
assertFalse(((TextView) v.findViewById(R.id.download)).getText().equals(""));
|
assertFalse(((TextView) v.findViewById(R.id.download)).getText().equals(""));
|
||||||
|
@ -50,12 +50,12 @@ public class NodesAdapterTest extends AndroidTestCase {
|
||||||
|
|
||||||
@MediumTest
|
@MediumTest
|
||||||
public void testGetViewConnections() {
|
public void testGetViewConnections() {
|
||||||
mAdapter.add(Arrays.asList(mNode));
|
mAdapter.add(Arrays.asList(mDevice));
|
||||||
mAdapter.onReceiveConnections(
|
mAdapter.onReceiveConnections(
|
||||||
new HashMap<String, RestApi.Connection>() {{ put(mNode.NodeID, mConnection); }});
|
new HashMap<String, RestApi.Connection>() {{ put(mDevice.DeviceID, mConnection); }});
|
||||||
View v = mAdapter.getView(0, null, null);
|
View v = mAdapter.getView(0, null, null);
|
||||||
|
|
||||||
assertEquals(getContext().getString(R.string.node_up_to_date),
|
assertEquals(getContext().getString(R.string.device_up_to_date),
|
||||||
((TextView) v.findViewById(R.id.status)).getText().toString());
|
((TextView) v.findViewById(R.id.status)).getText().toString());
|
||||||
assertEquals("1 Mb/s", ((TextView) v.findViewById(R.id.download)).getText().toString());
|
assertEquals("1 Mb/s", ((TextView) v.findViewById(R.id.download)).getText().toString());
|
||||||
assertEquals("1 Gb/s", ((TextView) v.findViewById(R.id.upload)).getText().toString());
|
assertEquals("1 Gb/s", ((TextView) v.findViewById(R.id.upload)).getText().toString());
|
|
@ -6,15 +6,15 @@ import android.test.suitebuilder.annotation.MediumTest;
|
||||||
import com.nutomic.syncthingandroid.syncthing.RestApi;
|
import com.nutomic.syncthingandroid.syncthing.RestApi;
|
||||||
import com.nutomic.syncthingandroid.test.MockContext;
|
import com.nutomic.syncthingandroid.test.MockContext;
|
||||||
import com.nutomic.syncthingandroid.test.Util;
|
import com.nutomic.syncthingandroid.test.Util;
|
||||||
import com.nutomic.syncthingandroid.util.RepoObserver;
|
import com.nutomic.syncthingandroid.util.FolderObserver;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
public class RepoObserverTest extends AndroidTestCase
|
public class FolderObserverTest extends AndroidTestCase
|
||||||
implements RepoObserver.OnRepoFileChangeListener {
|
implements FolderObserver.OnFolderFileChangeListener {
|
||||||
|
|
||||||
private File mTestFolder;
|
private File mTestFolder;
|
||||||
|
|
||||||
|
@ -36,15 +36,15 @@ public class RepoObserverTest extends AndroidTestCase
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRepoFileChange(String repoId, String relativePath) {
|
public void onFolderFileChange(String folderId, String relativePath) {
|
||||||
mLatch.countDown();
|
mLatch.countDown();
|
||||||
assertEquals(mCurrentTest, repoId);
|
assertEquals(mCurrentTest, folderId);
|
||||||
assertFalse(relativePath.endsWith("should-not-notifiy"));
|
assertFalse(relativePath.endsWith("should-not-notifiy"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private RestApi.Repo createRepo(String id) {
|
private RestApi.Folder createFolder(String id) {
|
||||||
RestApi.Repo r = new RestApi.Repo();
|
RestApi.Folder r = new RestApi.Folder();
|
||||||
r.Directory = mTestFolder.getAbsolutePath();
|
r.Path = mTestFolder.getAbsolutePath();
|
||||||
r.ID = id;
|
r.ID = id;
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ public class RepoObserverTest extends AndroidTestCase
|
||||||
mCurrentTest = "testRecursion";
|
mCurrentTest = "testRecursion";
|
||||||
File subFolder = new File(mTestFolder, "subfolder");
|
File subFolder = new File(mTestFolder, "subfolder");
|
||||||
subFolder.mkdir();
|
subFolder.mkdir();
|
||||||
RepoObserver ro = new RepoObserver(this, createRepo(mCurrentTest));
|
FolderObserver ro = new FolderObserver(this, createFolder(mCurrentTest));
|
||||||
File testFile = new File(subFolder, "test");
|
File testFile = new File(subFolder, "test");
|
||||||
mLatch = new CountDownLatch(1);
|
mLatch = new CountDownLatch(1);
|
||||||
testFile.createNewFile();
|
testFile.createNewFile();
|
||||||
|
@ -67,7 +67,7 @@ public class RepoObserverTest extends AndroidTestCase
|
||||||
mCurrentTest = "testRemoveDirectory";
|
mCurrentTest = "testRemoveDirectory";
|
||||||
File subFolder = new File(mTestFolder, "subfolder");
|
File subFolder = new File(mTestFolder, "subfolder");
|
||||||
subFolder.mkdir();
|
subFolder.mkdir();
|
||||||
RepoObserver ro = new RepoObserver(this, createRepo(mCurrentTest));
|
FolderObserver ro = new FolderObserver(this, createFolder(mCurrentTest));
|
||||||
File movedSubFolder = new File(getContext().getFilesDir(), subFolder.getName());
|
File movedSubFolder = new File(getContext().getFilesDir(), subFolder.getName());
|
||||||
subFolder.renameTo(movedSubFolder);
|
subFolder.renameTo(movedSubFolder);
|
||||||
File testFile = new File(movedSubFolder, "should-not-notifiy");
|
File testFile = new File(movedSubFolder, "should-not-notifiy");
|
||||||
|
@ -81,7 +81,7 @@ public class RepoObserverTest extends AndroidTestCase
|
||||||
public void testAddDirectory() throws IOException, InterruptedException {
|
public void testAddDirectory() throws IOException, InterruptedException {
|
||||||
mCurrentTest = "testAddDirectory";
|
mCurrentTest = "testAddDirectory";
|
||||||
File subFolder = new File(mTestFolder, "subfolder");
|
File subFolder = new File(mTestFolder, "subfolder");
|
||||||
RepoObserver ro = new RepoObserver(this, createRepo(mCurrentTest));
|
FolderObserver ro = new FolderObserver(this, createFolder(mCurrentTest));
|
||||||
subFolder.mkdir();
|
subFolder.mkdir();
|
||||||
File testFile = new File(subFolder, "test");
|
File testFile = new File(subFolder, "test");
|
||||||
mLatch = new CountDownLatch(1);
|
mLatch = new CountDownLatch(1);
|
|
@ -7,16 +7,16 @@ import android.widget.TextView;
|
||||||
|
|
||||||
import com.nutomic.syncthingandroid.R;
|
import com.nutomic.syncthingandroid.R;
|
||||||
import com.nutomic.syncthingandroid.syncthing.RestApi;
|
import com.nutomic.syncthingandroid.syncthing.RestApi;
|
||||||
import com.nutomic.syncthingandroid.util.ReposAdapter;
|
import com.nutomic.syncthingandroid.util.FoldersAdapter;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
public class ReposAdapterTest extends AndroidTestCase {
|
public class FoldersAdapterTest extends AndroidTestCase {
|
||||||
|
|
||||||
private ReposAdapter mAdapter;
|
private FoldersAdapter mAdapter;
|
||||||
|
|
||||||
private RestApi.Repo mRepo = new RestApi.Repo();
|
private RestApi.Folder mFolder = new RestApi.Folder();
|
||||||
|
|
||||||
private RestApi.Model mModel = new RestApi.Model();
|
private RestApi.Model mModel = new RestApi.Model();
|
||||||
|
|
||||||
|
@ -24,13 +24,13 @@ public class ReposAdapterTest extends AndroidTestCase {
|
||||||
protected void setUp() throws Exception {
|
protected void setUp() throws Exception {
|
||||||
super.setUp();
|
super.setUp();
|
||||||
|
|
||||||
mAdapter = new ReposAdapter(getContext());
|
mAdapter = new FoldersAdapter(getContext());
|
||||||
mRepo.Directory = "/my/dir/";
|
mFolder.Path = "/my/dir/";
|
||||||
mRepo.ID = "id 123";
|
mFolder.ID = "id 123";
|
||||||
mRepo.Invalid = "all good";
|
mFolder.Invalid = "all good";
|
||||||
mRepo.NodeIds = new ArrayList<>();
|
mFolder.DeviceIds = new ArrayList<>();
|
||||||
mRepo.ReadOnly = false;
|
mFolder.ReadOnly = false;
|
||||||
mRepo.Versioning = new RestApi.Versioning();
|
mFolder.Versioning = new RestApi.Versioning();
|
||||||
|
|
||||||
mModel.localFiles = 50;
|
mModel.localFiles = 50;
|
||||||
mModel.globalFiles = 500;
|
mModel.globalFiles = 500;
|
||||||
|
@ -40,17 +40,17 @@ public class ReposAdapterTest extends AndroidTestCase {
|
||||||
|
|
||||||
@MediumTest
|
@MediumTest
|
||||||
public void testGetViewNoModel() {
|
public void testGetViewNoModel() {
|
||||||
mAdapter.add(Arrays.asList(mRepo));
|
mAdapter.add(Arrays.asList(mFolder));
|
||||||
View v = mAdapter.getView(0, null, null);
|
View v = mAdapter.getView(0, null, null);
|
||||||
assertEquals(mRepo.ID, ((TextView) v.findViewById(R.id.id)).getText());
|
assertEquals(mFolder.ID, ((TextView) v.findViewById(R.id.id)).getText());
|
||||||
assertEquals(mRepo.Directory, ((TextView) v.findViewById(R.id.directory)).getText());
|
assertEquals(mFolder.Path, ((TextView) v.findViewById(R.id.directory)).getText());
|
||||||
assertEquals(mRepo.Invalid, ((TextView) v.findViewById(R.id.invalid)).getText());
|
assertEquals(mFolder.Invalid, ((TextView) v.findViewById(R.id.invalid)).getText());
|
||||||
}
|
}
|
||||||
|
|
||||||
@MediumTest
|
@MediumTest
|
||||||
public void testGetViewModel() {
|
public void testGetViewModel() {
|
||||||
mAdapter.add(Arrays.asList(mRepo));
|
mAdapter.add(Arrays.asList(mFolder));
|
||||||
mAdapter.onReceiveModel(mRepo.ID, mModel);
|
mAdapter.onReceiveModel(mFolder.ID, mModel);
|
||||||
View v = mAdapter.getView(0, null, null);
|
View v = mAdapter.getView(0, null, null);
|
||||||
assertFalse(((TextView) v.findViewById(R.id.state)).getText().toString().equals(""));
|
assertFalse(((TextView) v.findViewById(R.id.state)).getText().toString().equals(""));
|
||||||
String items = ((TextView) v.findViewById(R.id.items)).getText().toString();
|
String items = ((TextView) v.findViewById(R.id.items)).getText().toString();
|
|
@ -20,7 +20,6 @@ import android.support.v4.widget.DrawerLayout;
|
||||||
import android.support.v7.app.ActionBar;
|
import android.support.v7.app.ActionBar;
|
||||||
import android.support.v7.app.ActionBar.Tab;
|
import android.support.v7.app.ActionBar.Tab;
|
||||||
import android.support.v7.app.ActionBar.TabListener;
|
import android.support.v7.app.ActionBar.TabListener;
|
||||||
import android.util.Log;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
|
@ -28,14 +27,14 @@ import android.view.View;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.nutomic.syncthingandroid.R;
|
import com.nutomic.syncthingandroid.R;
|
||||||
import com.nutomic.syncthingandroid.fragments.LocalNodeInfoFragment;
|
import com.nutomic.syncthingandroid.fragments.DevicesFragment;
|
||||||
import com.nutomic.syncthingandroid.fragments.NodesFragment;
|
import com.nutomic.syncthingandroid.fragments.FoldersFragment;
|
||||||
import com.nutomic.syncthingandroid.fragments.ReposFragment;
|
import com.nutomic.syncthingandroid.fragments.LocalDeviceInfoFragment;
|
||||||
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
|
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shows {@link com.nutomic.syncthingandroid.fragments.ReposFragment} and {@link com.nutomic.syncthingandroid.fragments.NodesFragment} in different tabs, and
|
* Shows {@link com.nutomic.syncthingandroid.fragments.FoldersFragment} and {@link com.nutomic.syncthingandroid.fragments.DevicesFragment} in different tabs, and
|
||||||
* {@link com.nutomic.syncthingandroid.fragments.LocalNodeInfoFragment} in the navigation drawer.
|
* {@link com.nutomic.syncthingandroid.fragments.LocalDeviceInfoFragment} in the navigation drawer.
|
||||||
*/
|
*/
|
||||||
public class MainActivity extends SyncthingActivity
|
public class MainActivity extends SyncthingActivity
|
||||||
implements SyncthingService.OnApiChangeListener {
|
implements SyncthingService.OnApiChangeListener {
|
||||||
|
@ -45,7 +44,7 @@ public class MainActivity extends SyncthingActivity
|
||||||
private AlertDialog mDisabledDialog;
|
private AlertDialog mDisabledDialog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Causes population of repo and node lists, unlocks info drawer.
|
* Causes population of folder and device lists, unlocks info drawer.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@SuppressLint("InflateParams")
|
@SuppressLint("InflateParams")
|
||||||
|
@ -108,9 +107,9 @@ public class MainActivity extends SyncthingActivity
|
||||||
public Fragment getItem(int position) {
|
public Fragment getItem(int position) {
|
||||||
switch (position) {
|
switch (position) {
|
||||||
case 0:
|
case 0:
|
||||||
return mRepositoriesFragment;
|
return mFolderFragment;
|
||||||
case 1:
|
case 1:
|
||||||
return mNodesFragment;
|
return mDevicesFragment;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -123,11 +122,11 @@ public class MainActivity extends SyncthingActivity
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
private ReposFragment mRepositoriesFragment;
|
private FoldersFragment mFolderFragment;
|
||||||
|
|
||||||
private NodesFragment mNodesFragment;
|
private DevicesFragment mDevicesFragment;
|
||||||
|
|
||||||
private LocalNodeInfoFragment mLocalNodeInfoFragment;
|
private LocalDeviceInfoFragment mLocalDeviceInfoFragment;
|
||||||
|
|
||||||
private ViewPager mViewPager;
|
private ViewPager mViewPager;
|
||||||
|
|
||||||
|
@ -170,32 +169,32 @@ public class MainActivity extends SyncthingActivity
|
||||||
};
|
};
|
||||||
|
|
||||||
actionBar.addTab(actionBar.newTab()
|
actionBar.addTab(actionBar.newTab()
|
||||||
.setText(R.string.repositories_fragment_title)
|
.setText(R.string.folders_fragment_title)
|
||||||
.setTabListener(tabListener));
|
.setTabListener(tabListener));
|
||||||
actionBar.addTab(actionBar.newTab()
|
actionBar.addTab(actionBar.newTab()
|
||||||
.setText(R.string.nodes_fragment_title)
|
.setText(R.string.devices_fragment_title)
|
||||||
.setTabListener(tabListener));
|
.setTabListener(tabListener));
|
||||||
|
|
||||||
if (savedInstanceState != null) {
|
if (savedInstanceState != null) {
|
||||||
FragmentManager fm = getSupportFragmentManager();
|
FragmentManager fm = getSupportFragmentManager();
|
||||||
mRepositoriesFragment = (ReposFragment) fm.getFragment(
|
mFolderFragment = (FoldersFragment) fm.getFragment(
|
||||||
savedInstanceState, ReposFragment.class.getName());
|
savedInstanceState, FoldersFragment.class.getName());
|
||||||
mNodesFragment = (NodesFragment) fm.getFragment(
|
mDevicesFragment = (DevicesFragment) fm.getFragment(
|
||||||
savedInstanceState, NodesFragment.class.getName());
|
savedInstanceState, DevicesFragment.class.getName());
|
||||||
mLocalNodeInfoFragment = (LocalNodeInfoFragment) fm.getFragment(
|
mLocalDeviceInfoFragment = (LocalDeviceInfoFragment) fm.getFragment(
|
||||||
savedInstanceState, LocalNodeInfoFragment.class.getName());
|
savedInstanceState, LocalDeviceInfoFragment.class.getName());
|
||||||
mViewPager.setCurrentItem(savedInstanceState.getInt("currentTab"));
|
mViewPager.setCurrentItem(savedInstanceState.getInt("currentTab"));
|
||||||
} else {
|
} else {
|
||||||
mRepositoriesFragment = new ReposFragment();
|
mFolderFragment = new FoldersFragment();
|
||||||
mNodesFragment = new NodesFragment();
|
mDevicesFragment = new DevicesFragment();
|
||||||
mLocalNodeInfoFragment = new LocalNodeInfoFragment();
|
mLocalDeviceInfoFragment = new LocalDeviceInfoFragment();
|
||||||
}
|
}
|
||||||
|
|
||||||
getSupportFragmentManager()
|
getSupportFragmentManager()
|
||||||
.beginTransaction()
|
.beginTransaction()
|
||||||
.replace(R.id.drawer, mLocalNodeInfoFragment)
|
.replace(R.id.drawer, mLocalDeviceInfoFragment)
|
||||||
.commit();
|
.commit();
|
||||||
mDrawerToggle = mLocalNodeInfoFragment.new Toggle(this, mDrawerLayout,
|
mDrawerToggle = mLocalDeviceInfoFragment.new Toggle(this, mDrawerLayout,
|
||||||
R.drawable.ic_drawer);
|
R.drawable.ic_drawer);
|
||||||
mDrawerLayout.setDrawerListener(mDrawerToggle);
|
mDrawerLayout.setDrawerListener(mDrawerToggle);
|
||||||
}
|
}
|
||||||
|
@ -212,8 +211,8 @@ public class MainActivity extends SyncthingActivity
|
||||||
public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
|
public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
|
||||||
super.onServiceConnected(componentName, iBinder);
|
super.onServiceConnected(componentName, iBinder);
|
||||||
getService().registerOnApiChangeListener(this);
|
getService().registerOnApiChangeListener(this);
|
||||||
getService().registerOnApiChangeListener(mRepositoriesFragment);
|
getService().registerOnApiChangeListener(mFolderFragment);
|
||||||
getService().registerOnApiChangeListener(mNodesFragment);
|
getService().registerOnApiChangeListener(mDevicesFragment);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -223,12 +222,13 @@ public class MainActivity extends SyncthingActivity
|
||||||
protected void onSaveInstanceState(Bundle outState) {
|
protected void onSaveInstanceState(Bundle outState) {
|
||||||
super.onSaveInstanceState(outState);
|
super.onSaveInstanceState(outState);
|
||||||
// Avoid crash if called during startup.
|
// Avoid crash if called during startup.
|
||||||
if (mRepositoriesFragment != null && mNodesFragment != null &&
|
if (mFolderFragment != null && mDevicesFragment != null &&
|
||||||
mLocalNodeInfoFragment != null) {
|
mLocalDeviceInfoFragment != null) {
|
||||||
FragmentManager fm = getSupportFragmentManager();
|
FragmentManager fm = getSupportFragmentManager();
|
||||||
fm.putFragment(outState, ReposFragment.class.getName(), mRepositoriesFragment);
|
fm.putFragment(outState, FoldersFragment.class.getName(), mFolderFragment);
|
||||||
fm.putFragment(outState, NodesFragment.class.getName(), mNodesFragment);
|
fm.putFragment(outState, DevicesFragment.class.getName(), mDevicesFragment);
|
||||||
fm.putFragment(outState, LocalNodeInfoFragment.class.getName(), mLocalNodeInfoFragment);
|
fm.putFragment(outState, LocalDeviceInfoFragment.class.getName(),
|
||||||
|
mLocalDeviceInfoFragment);
|
||||||
outState.putInt("currentTab", mViewPager.getCurrentItem());
|
outState.putInt("currentTab", mViewPager.getCurrentItem());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -246,26 +246,26 @@ public class MainActivity extends SyncthingActivity
|
||||||
@Override
|
@Override
|
||||||
public boolean onPrepareOptionsMenu(Menu menu) {
|
public boolean onPrepareOptionsMenu(Menu menu) {
|
||||||
boolean drawerOpen = mDrawerLayout.isDrawerOpen(findViewById(R.id.drawer));
|
boolean drawerOpen = mDrawerLayout.isDrawerOpen(findViewById(R.id.drawer));
|
||||||
menu.findItem(R.id.share_node_id).setVisible(drawerOpen);
|
menu.findItem(R.id.share_device_id).setVisible(drawerOpen);
|
||||||
menu.findItem(R.id.exit).setVisible(!SyncthingService.alwaysRunInBackground(this));
|
menu.findItem(R.id.exit).setVisible(!SyncthingService.alwaysRunInBackground(this));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
if (mLocalNodeInfoFragment.onOptionsItemSelected(item) ||
|
if (mLocalDeviceInfoFragment.onOptionsItemSelected(item) ||
|
||||||
mDrawerToggle.onOptionsItemSelected(item)) {
|
mDrawerToggle.onOptionsItemSelected(item)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
case R.id.add_repo:
|
case R.id.add_folder:
|
||||||
Intent intent = new Intent(this, SettingsActivity.class)
|
Intent intent = new Intent(this, SettingsActivity.class)
|
||||||
.setAction(SettingsActivity.ACTION_REPO_SETTINGS_FRAGMENT)
|
.setAction(SettingsActivity.ACTION_REPO_SETTINGS_FRAGMENT)
|
||||||
.putExtra(SettingsActivity.EXTRA_IS_CREATE, true);
|
.putExtra(SettingsActivity.EXTRA_IS_CREATE, true);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
return true;
|
return true;
|
||||||
case R.id.add_node:
|
case R.id.add_device:
|
||||||
intent = new Intent(this, SettingsActivity.class)
|
intent = new Intent(this, SettingsActivity.class)
|
||||||
.setAction(SettingsActivity.ACTION_NODE_SETTINGS_FRAGMENT)
|
.setAction(SettingsActivity.ACTION_NODE_SETTINGS_FRAGMENT)
|
||||||
.putExtra(SettingsActivity.EXTRA_IS_CREATE, true);
|
.putExtra(SettingsActivity.EXTRA_IS_CREATE, true);
|
||||||
|
|
|
@ -6,8 +6,8 @@ import android.support.v4.app.FragmentManager;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import com.nutomic.syncthingandroid.R;
|
import com.nutomic.syncthingandroid.R;
|
||||||
import com.nutomic.syncthingandroid.fragments.NodeSettingsFragment;
|
import com.nutomic.syncthingandroid.fragments.DeviceSettingsFragment;
|
||||||
import com.nutomic.syncthingandroid.fragments.RepoSettingsFragment;
|
import com.nutomic.syncthingandroid.fragments.FolderSettingsFragment;
|
||||||
import com.nutomic.syncthingandroid.fragments.SettingsFragment;
|
import com.nutomic.syncthingandroid.fragments.SettingsFragment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,17 +17,17 @@ public class SettingsActivity extends SyncthingActivity {
|
||||||
|
|
||||||
public static final String ACTION_APP_SETTINGS_FRAGMENT = "app_settings_fragment";
|
public static final String ACTION_APP_SETTINGS_FRAGMENT = "app_settings_fragment";
|
||||||
|
|
||||||
public static final String ACTION_NODE_SETTINGS_FRAGMENT = "node_settings_fragment";
|
public static final String ACTION_NODE_SETTINGS_FRAGMENT = "device_settings_fragment";
|
||||||
|
|
||||||
public static final String ACTION_REPO_SETTINGS_FRAGMENT = "repo_settings_fragment";
|
public static final String ACTION_REPO_SETTINGS_FRAGMENT = "folder_settings_fragment";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Must be set for {@link #ACTION_NODE_SETTINGS_FRAGMENT} and
|
* Must be set for {@link #ACTION_NODE_SETTINGS_FRAGMENT} and
|
||||||
* {@link #ACTION_REPO_SETTINGS_FRAGMENT} to determine if an existing repo/node should be
|
* {@link #ACTION_REPO_SETTINGS_FRAGMENT} to determine if an existing folder/device should be
|
||||||
* edited or a new one created.
|
* edited or a new one created.
|
||||||
* <p/>
|
* <p/>
|
||||||
* If this is false, {@link com.nutomic.syncthingandroid.fragments.RepoSettingsFragment#EXTRA_REPO_ID} or
|
* If this is false, {@link com.nutomic.syncthingandroid.fragments.FolderSettingsFragment#EXTRA_REPO_ID} or
|
||||||
* {@link com.nutomic.syncthingandroid.fragments.NodeSettingsFragment#EXTRA_NODE_ID} must be set (according to the selected fragment).
|
* {@link com.nutomic.syncthingandroid.fragments.DeviceSettingsFragment#EXTRA_NODE_ID} must be set (according to the selected fragment).
|
||||||
*/
|
*/
|
||||||
public static final String EXTRA_IS_CREATE = "create";
|
public static final String EXTRA_IS_CREATE = "create";
|
||||||
|
|
||||||
|
@ -50,13 +50,13 @@ public class SettingsActivity extends SyncthingActivity {
|
||||||
mFragment = new SettingsFragment();
|
mFragment = new SettingsFragment();
|
||||||
break;
|
break;
|
||||||
case ACTION_NODE_SETTINGS_FRAGMENT:
|
case ACTION_NODE_SETTINGS_FRAGMENT:
|
||||||
mFragment = new NodeSettingsFragment();
|
mFragment = new DeviceSettingsFragment();
|
||||||
if (!getIntent().hasExtra(EXTRA_IS_CREATE)) {
|
if (!getIntent().hasExtra(EXTRA_IS_CREATE)) {
|
||||||
throw new IllegalArgumentException("EXTRA_IS_CREATE must be set");
|
throw new IllegalArgumentException("EXTRA_IS_CREATE must be set");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ACTION_REPO_SETTINGS_FRAGMENT:
|
case ACTION_REPO_SETTINGS_FRAGMENT:
|
||||||
mFragment = new RepoSettingsFragment();
|
mFragment = new FolderSettingsFragment();
|
||||||
if (!getIntent().hasExtra(EXTRA_IS_CREATE)) {
|
if (!getIntent().hasExtra(EXTRA_IS_CREATE)) {
|
||||||
throw new IllegalArgumentException("EXTRA_IS_CREATE must be set");
|
throw new IllegalArgumentException("EXTRA_IS_CREATE must be set");
|
||||||
}
|
}
|
||||||
|
@ -86,13 +86,13 @@ public class SettingsActivity extends SyncthingActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used for the QR code scanner in NodeSettingsFragment.
|
* Used for the QR code scanner in DeviceSettingsFragment.
|
||||||
*
|
*
|
||||||
* Instead of the cast, an interface could be used (if there are multiple fragments using this).
|
* Instead of the cast, an interface could be used (if there are multiple fragments using this).
|
||||||
*/
|
*/
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
if (mFragment instanceof NodeSettingsFragment) {
|
if (mFragment instanceof DeviceSettingsFragment) {
|
||||||
((NodeSettingsFragment) mFragment).onClick(view);
|
((DeviceSettingsFragment) mFragment).onClick(view);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,22 +26,22 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shows node details and allows changing them.
|
* Shows device details and allows changing them.
|
||||||
*/
|
*/
|
||||||
public class NodeSettingsFragment extends PreferenceFragment implements
|
public class DeviceSettingsFragment extends PreferenceFragment implements
|
||||||
SyncthingActivity.OnServiceConnectedListener, Preference.OnPreferenceChangeListener,
|
SyncthingActivity.OnServiceConnectedListener, Preference.OnPreferenceChangeListener,
|
||||||
Preference.OnPreferenceClickListener, RestApi.OnReceiveConnectionsListener,
|
Preference.OnPreferenceClickListener, RestApi.OnReceiveConnectionsListener,
|
||||||
SyncthingService.OnApiChangeListener, RestApi.OnNodeIdNormalizedListener {
|
SyncthingService.OnApiChangeListener, RestApi.OnDeviceIdNormalizedListener {
|
||||||
|
|
||||||
public static final String EXTRA_NODE_ID = "node_id";
|
public static final String EXTRA_NODE_ID = "device_id";
|
||||||
|
|
||||||
private static final int SCAN_QR_REQUEST_CODE = 235;
|
private static final int SCAN_QR_REQUEST_CODE = 235;
|
||||||
|
|
||||||
private SyncthingService mSyncthingService;
|
private SyncthingService mSyncthingService;
|
||||||
|
|
||||||
private RestApi.Node mNode;
|
private RestApi.Device mDevice;
|
||||||
|
|
||||||
private Preference mNodeId;
|
private Preference mDeviceId;
|
||||||
|
|
||||||
private EditTextPreference mName;
|
private EditTextPreference mName;
|
||||||
|
|
||||||
|
@ -65,13 +65,13 @@ public class NodeSettingsFragment extends PreferenceFragment implements
|
||||||
setHasOptionsMenu(true);
|
setHasOptionsMenu(true);
|
||||||
|
|
||||||
if (mIsCreate) {
|
if (mIsCreate) {
|
||||||
addPreferencesFromResource(R.xml.node_settings_create);
|
addPreferencesFromResource(R.xml.device_settings_create);
|
||||||
} else {
|
} else {
|
||||||
addPreferencesFromResource(R.xml.node_settings_edit);
|
addPreferencesFromResource(R.xml.device_settings_edit);
|
||||||
}
|
}
|
||||||
|
|
||||||
mNodeId = findPreference("node_id");
|
mDeviceId = findPreference("device_id");
|
||||||
mNodeId.setOnPreferenceChangeListener(this);
|
mDeviceId.setOnPreferenceChangeListener(this);
|
||||||
mName = (EditTextPreference) findPreference("name");
|
mName = (EditTextPreference) findPreference("name");
|
||||||
mName.setOnPreferenceChangeListener(this);
|
mName.setOnPreferenceChangeListener(this);
|
||||||
mAddresses = (EditTextPreference) findPreference("addresses");
|
mAddresses = (EditTextPreference) findPreference("addresses");
|
||||||
|
@ -102,45 +102,45 @@ public class NodeSettingsFragment extends PreferenceFragment implements
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mIsCreate) {
|
if (mIsCreate) {
|
||||||
getActivity().setTitle(R.string.add_node);
|
getActivity().setTitle(R.string.add_device);
|
||||||
mNode = new RestApi.Node();
|
mDevice = new RestApi.Device();
|
||||||
mNode.Name = "";
|
mDevice.Name = "";
|
||||||
mNode.NodeID = "";
|
mDevice.DeviceID = "";
|
||||||
mNode.Addresses = "dynamic";
|
mDevice.Addresses = "dynamic";
|
||||||
mNode.Compression = true;
|
mDevice.Compression = true;
|
||||||
((EditTextPreference) mNodeId).setText(mNode.NodeID);
|
((EditTextPreference) mDeviceId).setText(mDevice.DeviceID);
|
||||||
} else {
|
} else {
|
||||||
getActivity().setTitle(R.string.edit_node);
|
getActivity().setTitle(R.string.edit_device);
|
||||||
List<RestApi.Node> nodes = mSyncthingService.getApi().getNodes();
|
List<RestApi.Device> devices = mSyncthingService.getApi().getDevices();
|
||||||
for (int i = 0; i < nodes.size(); i++) {
|
for (int i = 0; i < devices.size(); i++) {
|
||||||
if (nodes.get(i).NodeID.equals(
|
if (devices.get(i).DeviceID.equals(
|
||||||
getActivity().getIntent().getStringExtra(EXTRA_NODE_ID))) {
|
getActivity().getIntent().getStringExtra(EXTRA_NODE_ID))) {
|
||||||
mNode = nodes.get(i);
|
mDevice = devices.get(i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mNodeId.setOnPreferenceClickListener(this);
|
mDeviceId.setOnPreferenceClickListener(this);
|
||||||
}
|
}
|
||||||
mSyncthingService.getApi().getConnections(NodeSettingsFragment.this);
|
mSyncthingService.getApi().getConnections(DeviceSettingsFragment.this);
|
||||||
|
|
||||||
mNodeId.setSummary(mNode.NodeID);
|
mDeviceId.setSummary(mDevice.DeviceID);
|
||||||
mName.setText((mNode.Name));
|
mName.setText((mDevice.Name));
|
||||||
mName.setSummary(mNode.Name);
|
mName.setSummary(mDevice.Name);
|
||||||
mAddresses.setText(mNode.Addresses);
|
mAddresses.setText(mDevice.Addresses);
|
||||||
mAddresses.setSummary(mNode.Addresses);
|
mAddresses.setSummary(mDevice.Addresses);
|
||||||
mCompression.setChecked(mNode.Compression);
|
mCompression.setChecked(mDevice.Compression);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||||
super.onCreateOptionsMenu(menu, inflater);
|
super.onCreateOptionsMenu(menu, inflater);
|
||||||
inflater.inflate(R.menu.node_settings, menu);
|
inflater.inflate(R.menu.device_settings, menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPrepareOptionsMenu(Menu menu) {
|
public void onPrepareOptionsMenu(Menu menu) {
|
||||||
menu.findItem(R.id.create).setVisible(mIsCreate);
|
menu.findItem(R.id.create).setVisible(mIsCreate);
|
||||||
menu.findItem(R.id.share_node_id).setVisible(!mIsCreate);
|
menu.findItem(R.id.share_device_id).setVisible(!mIsCreate);
|
||||||
menu.findItem(R.id.delete).setVisible(!mIsCreate);
|
menu.findItem(R.id.delete).setVisible(!mIsCreate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,28 +148,28 @@ public class NodeSettingsFragment extends PreferenceFragment implements
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
case R.id.create:
|
case R.id.create:
|
||||||
if (mNode.NodeID.equals("")) {
|
if (mDevice.DeviceID.equals("")) {
|
||||||
Toast.makeText(getActivity(), R.string.node_id_required, Toast.LENGTH_LONG)
|
Toast.makeText(getActivity(), R.string.device_id_required, Toast.LENGTH_LONG)
|
||||||
.show();
|
.show();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (mNode.Name.equals("")) {
|
if (mDevice.Name.equals("")) {
|
||||||
Toast.makeText(getActivity(), R.string.node_name_required, Toast.LENGTH_LONG)
|
Toast.makeText(getActivity(), R.string.device_name_required, Toast.LENGTH_LONG)
|
||||||
.show();
|
.show();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
mSyncthingService.getApi().editNode(mNode, getActivity(), this);
|
mSyncthingService.getApi().editDevice(mDevice, getActivity(), this);
|
||||||
return true;
|
return true;
|
||||||
case R.id.share_node_id:
|
case R.id.share_device_id:
|
||||||
RestApi.shareNodeId(getActivity(), mNode.NodeID);
|
RestApi.shareDeviceId(getActivity(), mDevice.DeviceID);
|
||||||
return true;
|
return true;
|
||||||
case R.id.delete:
|
case R.id.delete:
|
||||||
new AlertDialog.Builder(getActivity())
|
new AlertDialog.Builder(getActivity())
|
||||||
.setMessage(R.string.delete_node_confirm)
|
.setMessage(R.string.delete_device_confirm)
|
||||||
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
|
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialogInterface, int i) {
|
public void onClick(DialogInterface dialogInterface, int i) {
|
||||||
mSyncthingService.getApi().deleteNode(mNode, getActivity());
|
mSyncthingService.getApi().deleteDevice(mDevice, getActivity());
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.setNegativeButton(android.R.string.no, null)
|
.setNegativeButton(android.R.string.no, null)
|
||||||
|
@ -190,21 +190,21 @@ public class NodeSettingsFragment extends PreferenceFragment implements
|
||||||
pref.setSummary((String) o);
|
pref.setSummary((String) o);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (preference.equals(mNodeId)) {
|
if (preference.equals(mDeviceId)) {
|
||||||
mNode.NodeID = (String) o;
|
mDevice.DeviceID = (String) o;
|
||||||
nodeUpdated();
|
deviceUpdated();
|
||||||
return true;
|
return true;
|
||||||
} else if (preference.equals(mName)) {
|
} else if (preference.equals(mName)) {
|
||||||
mNode.Name = (String) o;
|
mDevice.Name = (String) o;
|
||||||
nodeUpdated();
|
deviceUpdated();
|
||||||
return true;
|
return true;
|
||||||
} else if (preference.equals(mAddresses)) {
|
} else if (preference.equals(mAddresses)) {
|
||||||
mNode.Addresses = (String) o;
|
mDevice.Addresses = (String) o;
|
||||||
nodeUpdated();
|
deviceUpdated();
|
||||||
return true;
|
return true;
|
||||||
} else if (preference.equals(mCompression)) {
|
} else if (preference.equals(mCompression)) {
|
||||||
mNode.Compression = (Boolean) o;
|
mDevice.Compression = (Boolean) o;
|
||||||
nodeUpdated();
|
deviceUpdated();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -212,33 +212,33 @@ public class NodeSettingsFragment extends PreferenceFragment implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onPreferenceClick(Preference preference) {
|
public boolean onPreferenceClick(Preference preference) {
|
||||||
if (preference.equals(mNodeId)) {
|
if (preference.equals(mDeviceId)) {
|
||||||
mSyncthingService.getApi().copyNodeId(mNode.NodeID);
|
mSyncthingService.getApi().copyDeviceId(mDevice.DeviceID);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets version and current address of the node.
|
* Sets version and current address of the device.
|
||||||
*
|
*
|
||||||
* NOTE: This is only called once on startup, should be called more often to properly display
|
* NOTE: This is only called once on startup, should be called more often to properly display
|
||||||
* version/address changes.
|
* version/address changes.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void onReceiveConnections(Map<String, RestApi.Connection> connections) {
|
public void onReceiveConnections(Map<String, RestApi.Connection> connections) {
|
||||||
if (connections.containsKey(mNode.NodeID)) {
|
if (connections.containsKey(mDevice.DeviceID)) {
|
||||||
mVersion.setSummary(connections.get(mNode.NodeID).ClientVersion);
|
mVersion.setSummary(connections.get(mDevice.DeviceID).ClientVersion);
|
||||||
mCurrentAddress.setSummary(connections.get(mNode.NodeID).Address);
|
mCurrentAddress.setSummary(connections.get(mDevice.DeviceID).Address);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends the updated node info if in edit mode.
|
* Sends the updated device info if in edit mode.
|
||||||
*/
|
*/
|
||||||
private void nodeUpdated() {
|
private void deviceUpdated() {
|
||||||
if (!mIsCreate) {
|
if (!mIsCreate) {
|
||||||
mSyncthingService.getApi().editNode(mNode, getActivity(), this);
|
mSyncthingService.getApi().editDevice(mDevice, getActivity(), this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -259,23 +259,23 @@ public class NodeSettingsFragment extends PreferenceFragment implements
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Receives value of scanned QR code and sets it as node ID.
|
* Receives value of scanned QR code and sets it as device ID.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||||
if (requestCode == SCAN_QR_REQUEST_CODE && resultCode == Activity.RESULT_OK) {
|
if (requestCode == SCAN_QR_REQUEST_CODE && resultCode == Activity.RESULT_OK) {
|
||||||
mNode.NodeID = data.getStringExtra("SCAN_RESULT");
|
mDevice.DeviceID = data.getStringExtra("SCAN_RESULT");
|
||||||
((EditTextPreference) mNodeId).setText(mNode.NodeID);
|
((EditTextPreference) mDeviceId).setText(mDevice.DeviceID);
|
||||||
mNodeId.setSummary(mNode.NodeID);
|
mDeviceId.setSummary(mDevice.DeviceID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback for {@link RestApi#editNode}.
|
* Callback for {@link RestApi#editDevice}.
|
||||||
* Displays an error toast if error message present.
|
* Displays an error toast if error message present.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void onNodeIdNormalized(String normalizedId, String error) {
|
public void onDeviceIdNormalized(String normalizedId, String error) {
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
Toast.makeText(getActivity(), error, Toast.LENGTH_LONG).show();
|
Toast.makeText(getActivity(), error, Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
|
@ -12,18 +12,18 @@ import com.nutomic.syncthingandroid.activities.MainActivity;
|
||||||
import com.nutomic.syncthingandroid.activities.SettingsActivity;
|
import com.nutomic.syncthingandroid.activities.SettingsActivity;
|
||||||
import com.nutomic.syncthingandroid.activities.SyncthingActivity;
|
import com.nutomic.syncthingandroid.activities.SyncthingActivity;
|
||||||
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
|
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
|
||||||
import com.nutomic.syncthingandroid.util.NodesAdapter;
|
import com.nutomic.syncthingandroid.util.DevicesAdapter;
|
||||||
|
|
||||||
import java.util.Timer;
|
import java.util.Timer;
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays a list of all existing nodes.
|
* Displays a list of all existing devices.
|
||||||
*/
|
*/
|
||||||
public class NodesFragment extends ListFragment implements SyncthingService.OnApiChangeListener,
|
public class DevicesFragment extends ListFragment implements SyncthingService.OnApiChangeListener,
|
||||||
ListView.OnItemClickListener {
|
ListView.OnItemClickListener {
|
||||||
|
|
||||||
private NodesAdapter mAdapter;
|
private DevicesAdapter mAdapter;
|
||||||
|
|
||||||
private Timer mTimer;
|
private Timer mTimer;
|
||||||
|
|
||||||
|
@ -53,10 +53,10 @@ public class NodesFragment extends ListFragment implements SyncthingService.OnAp
|
||||||
if (activity == null || activity.getApi() == null)
|
if (activity == null || activity.getApi() == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mAdapter = new NodesAdapter(activity);
|
mAdapter = new DevicesAdapter(activity);
|
||||||
mAdapter.add(activity.getApi().getNodes());
|
mAdapter.add(activity.getApi().getDevices());
|
||||||
setListAdapter(mAdapter);
|
setListAdapter(mAdapter);
|
||||||
setEmptyText(getString(R.string.nodes_list_empty));
|
setEmptyText(getString(R.string.devices_list_empty));
|
||||||
getListView().setOnItemClickListener(this);
|
getListView().setOnItemClickListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ public class NodesFragment extends ListFragment implements SyncthingService.OnAp
|
||||||
Intent intent = new Intent(getActivity(), SettingsActivity.class);
|
Intent intent = new Intent(getActivity(), SettingsActivity.class);
|
||||||
intent.setAction(SettingsActivity.ACTION_NODE_SETTINGS_FRAGMENT);
|
intent.setAction(SettingsActivity.ACTION_NODE_SETTINGS_FRAGMENT);
|
||||||
intent.putExtra(SettingsActivity.EXTRA_IS_CREATE, false);
|
intent.putExtra(SettingsActivity.EXTRA_IS_CREATE, false);
|
||||||
intent.putExtra(NodeSettingsFragment.EXTRA_NODE_ID, mAdapter.getItem(i).NodeID);
|
intent.putExtra(DeviceSettingsFragment.EXTRA_NODE_ID, mAdapter.getItem(i).DeviceID);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,9 +29,9 @@ import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shows repo details and allows changing them.
|
* Shows folder details and allows changing them.
|
||||||
*/
|
*/
|
||||||
public class RepoSettingsFragment extends PreferenceFragment
|
public class FolderSettingsFragment extends PreferenceFragment
|
||||||
implements SyncthingActivity.OnServiceConnectedListener,
|
implements SyncthingActivity.OnServiceConnectedListener,
|
||||||
Preference.OnPreferenceChangeListener, Preference.OnPreferenceClickListener,
|
Preference.OnPreferenceChangeListener, Preference.OnPreferenceClickListener,
|
||||||
SyncthingService.OnApiChangeListener {
|
SyncthingService.OnApiChangeListener {
|
||||||
|
@ -39,26 +39,26 @@ public class RepoSettingsFragment extends PreferenceFragment
|
||||||
private static final int DIRECTORY_REQUEST_CODE = 234;
|
private static final int DIRECTORY_REQUEST_CODE = 234;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ID of the repo to be edited. To be used with {@link com.nutomic.syncthingandroid.activities.SettingsActivity#EXTRA_IS_CREATE}
|
* The ID of the folder to be edited. To be used with {@link com.nutomic.syncthingandroid.activities.SettingsActivity#EXTRA_IS_CREATE}
|
||||||
* set to false.
|
* set to false.
|
||||||
*/
|
*/
|
||||||
public static final String EXTRA_REPO_ID = "repo_id";
|
public static final String EXTRA_REPO_ID = "folder_id";
|
||||||
|
|
||||||
private static final String KEY_NODE_SHARED = "node_shared";
|
private static final String KEY_NODE_SHARED = "device_shared";
|
||||||
|
|
||||||
private SyncthingService mSyncthingService;
|
private SyncthingService mSyncthingService;
|
||||||
|
|
||||||
private RestApi.Repo mRepo;
|
private RestApi.Folder mFolder;
|
||||||
|
|
||||||
private EditTextPreference mRepoId;
|
private EditTextPreference mFolderId;
|
||||||
|
|
||||||
private Preference mDirectory;
|
private Preference mDirectory;
|
||||||
|
|
||||||
private EditTextPreference mRescanInterval;
|
private EditTextPreference mRescanInterval;
|
||||||
|
|
||||||
private CheckBoxPreference mRepoMaster;
|
private CheckBoxPreference mFolderMaster;
|
||||||
|
|
||||||
private PreferenceScreen mNodes;
|
private PreferenceScreen mDevices;
|
||||||
|
|
||||||
private CheckBoxPreference mVersioning;
|
private CheckBoxPreference mVersioning;
|
||||||
|
|
||||||
|
@ -76,21 +76,21 @@ public class RepoSettingsFragment extends PreferenceFragment
|
||||||
setHasOptionsMenu(true);
|
setHasOptionsMenu(true);
|
||||||
|
|
||||||
if (mIsCreate) {
|
if (mIsCreate) {
|
||||||
addPreferencesFromResource(R.xml.repo_settings_create);
|
addPreferencesFromResource(R.xml.folder_settings_create);
|
||||||
} else {
|
} else {
|
||||||
addPreferencesFromResource(R.xml.repo_settings_edit);
|
addPreferencesFromResource(R.xml.folder_settings_edit);
|
||||||
}
|
}
|
||||||
|
|
||||||
mRepoId = (EditTextPreference) findPreference("repo_id");
|
mFolderId = (EditTextPreference) findPreference("folder_id");
|
||||||
mRepoId.setOnPreferenceChangeListener(this);
|
mFolderId.setOnPreferenceChangeListener(this);
|
||||||
mDirectory = findPreference("directory");
|
mDirectory = findPreference("directory");
|
||||||
mDirectory.setOnPreferenceClickListener(this);
|
mDirectory.setOnPreferenceClickListener(this);
|
||||||
mRescanInterval = (EditTextPreference) findPreference("rescan_interval");
|
mRescanInterval = (EditTextPreference) findPreference("rescan_interval");
|
||||||
mRescanInterval.setOnPreferenceChangeListener(this);
|
mRescanInterval.setOnPreferenceChangeListener(this);
|
||||||
mRepoMaster = (CheckBoxPreference) findPreference("repo_master");
|
mFolderMaster = (CheckBoxPreference) findPreference("folder_master");
|
||||||
mRepoMaster.setOnPreferenceChangeListener(this);
|
mFolderMaster.setOnPreferenceChangeListener(this);
|
||||||
mNodes = (PreferenceScreen) findPreference("nodes");
|
mDevices = (PreferenceScreen) findPreference("devices");
|
||||||
mNodes.setOnPreferenceClickListener(this);
|
mDevices.setOnPreferenceClickListener(this);
|
||||||
mVersioning = (CheckBoxPreference) findPreference("versioning");
|
mVersioning = (CheckBoxPreference) findPreference("versioning");
|
||||||
mVersioning.setOnPreferenceChangeListener(this);
|
mVersioning.setOnPreferenceChangeListener(this);
|
||||||
mVersioningKeep = (EditTextPreference) findPreference("versioning_keep");
|
mVersioningKeep = (EditTextPreference) findPreference("versioning_keep");
|
||||||
|
@ -108,49 +108,49 @@ public class RepoSettingsFragment extends PreferenceFragment
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mIsCreate) {
|
if (mIsCreate) {
|
||||||
getActivity().setTitle(R.string.create_repo);
|
getActivity().setTitle(R.string.create_folder);
|
||||||
mRepo = new RestApi.Repo();
|
mFolder = new RestApi.Folder();
|
||||||
mRepo.ID = "";
|
mFolder.ID = "";
|
||||||
mRepo.Directory = "";
|
mFolder.Path = "";
|
||||||
mRepo.RescanIntervalS = 86400;
|
mFolder.RescanIntervalS = 86400;
|
||||||
mRepo.NodeIds = new ArrayList<>();
|
mFolder.DeviceIds = new ArrayList<>();
|
||||||
mRepo.Versioning = new RestApi.Versioning();
|
mFolder.Versioning = new RestApi.Versioning();
|
||||||
} else {
|
} else {
|
||||||
getActivity().setTitle(R.string.edit_repo);
|
getActivity().setTitle(R.string.edit_folder);
|
||||||
List<RestApi.Repo> repos = mSyncthingService.getApi().getRepos();
|
List<RestApi.Folder> folders = mSyncthingService.getApi().getFolders();
|
||||||
for (int i = 0; i < repos.size(); i++) {
|
for (int i = 0; i < folders.size(); i++) {
|
||||||
if (repos.get(i).ID.equals(
|
if (folders.get(i).ID.equals(
|
||||||
getActivity().getIntent().getStringExtra(EXTRA_REPO_ID))) {
|
getActivity().getIntent().getStringExtra(EXTRA_REPO_ID))) {
|
||||||
mRepo = repos.get(i);
|
mFolder = folders.get(i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mRepoId.setText(mRepo.ID);
|
mFolderId.setText(mFolder.ID);
|
||||||
mRepoId.setSummary(mRepo.ID);
|
mFolderId.setSummary(mFolder.ID);
|
||||||
mDirectory.setSummary(mRepo.Directory);
|
mDirectory.setSummary(mFolder.Path);
|
||||||
mRescanInterval.setText(Integer.toString(mRepo.RescanIntervalS));
|
mRescanInterval.setText(Integer.toString(mFolder.RescanIntervalS));
|
||||||
mRescanInterval.setSummary(Integer.toString(mRepo.RescanIntervalS));
|
mRescanInterval.setSummary(Integer.toString(mFolder.RescanIntervalS));
|
||||||
mRepoMaster.setChecked(mRepo.ReadOnly);
|
mFolderMaster.setChecked(mFolder.ReadOnly);
|
||||||
List<RestApi.Node> nodesList = mSyncthingService.getApi().getNodes();
|
List<RestApi.Device> devicesList = mSyncthingService.getApi().getDevices();
|
||||||
for (RestApi.Node n : nodesList) {
|
for (RestApi.Device n : devicesList) {
|
||||||
ExtendedCheckBoxPreference cbp = new ExtendedCheckBoxPreference(getActivity(), n);
|
ExtendedCheckBoxPreference cbp = new ExtendedCheckBoxPreference(getActivity(), n);
|
||||||
cbp.setTitle(n.Name);
|
cbp.setTitle(n.Name);
|
||||||
cbp.setKey(KEY_NODE_SHARED);
|
cbp.setKey(KEY_NODE_SHARED);
|
||||||
cbp.setOnPreferenceChangeListener(RepoSettingsFragment.this);
|
cbp.setOnPreferenceChangeListener(FolderSettingsFragment.this);
|
||||||
cbp.setChecked(false);
|
cbp.setChecked(false);
|
||||||
for (String n2 : mRepo.NodeIds) {
|
for (String n2 : mFolder.DeviceIds) {
|
||||||
if (n2.equals(n.NodeID)) {
|
if (n2.equals(n.DeviceID)) {
|
||||||
cbp.setChecked(true);
|
cbp.setChecked(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mNodes.addPreference(cbp);
|
mDevices.addPreference(cbp);
|
||||||
}
|
}
|
||||||
mVersioning.setChecked(mRepo.Versioning instanceof RestApi.SimpleVersioning);
|
mVersioning.setChecked(mFolder.Versioning instanceof RestApi.SimpleVersioning);
|
||||||
if (mVersioning.isChecked()) {
|
if (mVersioning.isChecked()) {
|
||||||
mVersioningKeep.setText(mRepo.Versioning.getParams().get("keep"));
|
mVersioningKeep.setText(mFolder.Versioning.getParams().get("keep"));
|
||||||
mVersioningKeep.setSummary(mRepo.Versioning.getParams().get("keep"));
|
mVersioningKeep.setSummary(mFolder.Versioning.getParams().get("keep"));
|
||||||
mVersioningKeep.setEnabled(true);
|
mVersioningKeep.setEnabled(true);
|
||||||
} else {
|
} else {
|
||||||
mVersioningKeep.setEnabled(false);
|
mVersioningKeep.setEnabled(false);
|
||||||
|
@ -166,7 +166,7 @@ public class RepoSettingsFragment extends PreferenceFragment
|
||||||
@Override
|
@Override
|
||||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||||
super.onCreateOptionsMenu(menu, inflater);
|
super.onCreateOptionsMenu(menu, inflater);
|
||||||
inflater.inflate(R.menu.repo_settings, menu);
|
inflater.inflate(R.menu.folder_settings, menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -179,25 +179,25 @@ public class RepoSettingsFragment extends PreferenceFragment
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
case R.id.create:
|
case R.id.create:
|
||||||
if (mRepo.ID.equals("")) {
|
if (mFolder.ID.equals("")) {
|
||||||
Toast.makeText(getActivity(), R.string.repo_id_required, Toast.LENGTH_LONG)
|
Toast.makeText(getActivity(), R.string.folder_id_required, Toast.LENGTH_LONG)
|
||||||
.show();
|
.show();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (mRepo.Directory.equals("")) {
|
if (mFolder.Path.equals("")) {
|
||||||
Toast.makeText(getActivity(), R.string.repo_path_required, Toast.LENGTH_LONG)
|
Toast.makeText(getActivity(), R.string.folder_path_required, Toast.LENGTH_LONG)
|
||||||
.show();
|
.show();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
mSyncthingService.getApi().editRepo(mRepo, true, getActivity());
|
mSyncthingService.getApi().editFolder(mFolder, true, getActivity());
|
||||||
return true;
|
return true;
|
||||||
case R.id.delete:
|
case R.id.delete:
|
||||||
new AlertDialog.Builder(getActivity())
|
new AlertDialog.Builder(getActivity())
|
||||||
.setMessage(R.string.delete_repo_confirm)
|
.setMessage(R.string.delete_folder_confirm)
|
||||||
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
|
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialogInterface, int i) {
|
public void onClick(DialogInterface dialogInterface, int i) {
|
||||||
mSyncthingService.getApi().deleteRepo(mRepo, getActivity());
|
mSyncthingService.getApi().deleteFolder(mFolder, getActivity());
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.setNegativeButton(android.R.string.no, null)
|
.setNegativeButton(android.R.string.no, null)
|
||||||
|
@ -217,56 +217,56 @@ public class RepoSettingsFragment extends PreferenceFragment
|
||||||
pref.setSummary((String) o);
|
pref.setSummary((String) o);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (preference.equals(mRepoId)) {
|
if (preference.equals(mFolderId)) {
|
||||||
mRepo.ID = (String) o;
|
mFolder.ID = (String) o;
|
||||||
repoUpdated();
|
folderUpdated();
|
||||||
return true;
|
return true;
|
||||||
} else if (preference.equals(mDirectory)) {
|
} else if (preference.equals(mDirectory)) {
|
||||||
mRepo.Directory = (String) o;
|
mFolder.Path = (String) o;
|
||||||
repoUpdated();
|
folderUpdated();
|
||||||
return true;
|
return true;
|
||||||
} else if (preference.equals(mRescanInterval)) {
|
} else if (preference.equals(mRescanInterval)) {
|
||||||
mRepo.RescanIntervalS = Integer.parseInt((String) o);
|
mFolder.RescanIntervalS = Integer.parseInt((String) o);
|
||||||
mRescanInterval.setSummary((String) o);
|
mRescanInterval.setSummary((String) o);
|
||||||
repoUpdated();
|
folderUpdated();
|
||||||
return true;
|
return true;
|
||||||
} else if (preference.equals(mRepoMaster)) {
|
} else if (preference.equals(mFolderMaster)) {
|
||||||
mRepo.ReadOnly = (Boolean) o;
|
mFolder.ReadOnly = (Boolean) o;
|
||||||
repoUpdated();
|
folderUpdated();
|
||||||
return true;
|
return true;
|
||||||
} else if (preference.getKey().equals(KEY_NODE_SHARED)) {
|
} else if (preference.getKey().equals(KEY_NODE_SHARED)) {
|
||||||
ExtendedCheckBoxPreference pref = (ExtendedCheckBoxPreference) preference;
|
ExtendedCheckBoxPreference pref = (ExtendedCheckBoxPreference) preference;
|
||||||
RestApi.Node node = (RestApi.Node) pref.getObject();
|
RestApi.Device device = (RestApi.Device) pref.getObject();
|
||||||
if ((Boolean) o) {
|
if ((Boolean) o) {
|
||||||
mRepo.NodeIds.add(node.NodeID);
|
mFolder.DeviceIds.add(device.DeviceID);
|
||||||
} else {
|
} else {
|
||||||
Iterator<String> it = mRepo.NodeIds.iterator();
|
Iterator<String> it = mFolder.DeviceIds.iterator();
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
String n = it.next();
|
String n = it.next();
|
||||||
if (n.equals(node.NodeID)) {
|
if (n.equals(device.DeviceID)) {
|
||||||
it.remove();
|
it.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
repoUpdated();
|
folderUpdated();
|
||||||
return true;
|
return true;
|
||||||
} else if (preference.equals(mVersioning)) {
|
} else if (preference.equals(mVersioning)) {
|
||||||
mVersioningKeep.setEnabled((Boolean) o);
|
mVersioningKeep.setEnabled((Boolean) o);
|
||||||
if ((Boolean) o) {
|
if ((Boolean) o) {
|
||||||
RestApi.SimpleVersioning v = new RestApi.SimpleVersioning();
|
RestApi.SimpleVersioning v = new RestApi.SimpleVersioning();
|
||||||
mRepo.Versioning = v;
|
mFolder.Versioning = v;
|
||||||
v.setParams(5);
|
v.setParams(5);
|
||||||
mVersioningKeep.setText("5");
|
mVersioningKeep.setText("5");
|
||||||
mVersioningKeep.setSummary("5");
|
mVersioningKeep.setSummary("5");
|
||||||
} else {
|
} else {
|
||||||
mRepo.Versioning = new RestApi.Versioning();
|
mFolder.Versioning = new RestApi.Versioning();
|
||||||
}
|
}
|
||||||
repoUpdated();
|
folderUpdated();
|
||||||
return true;
|
return true;
|
||||||
} else if (preference.equals(mVersioningKeep)) {
|
} else if (preference.equals(mVersioningKeep)) {
|
||||||
((RestApi.SimpleVersioning) mRepo.Versioning)
|
((RestApi.SimpleVersioning) mFolder.Versioning)
|
||||||
.setParams(Integer.parseInt((String) o));
|
.setParams(Integer.parseInt((String) o));
|
||||||
repoUpdated();
|
folderUpdated();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,13 +278,13 @@ public class RepoSettingsFragment extends PreferenceFragment
|
||||||
if (preference.equals(mDirectory)) {
|
if (preference.equals(mDirectory)) {
|
||||||
Intent intent = new Intent(getActivity(), FolderPickerActivity.class)
|
Intent intent = new Intent(getActivity(), FolderPickerActivity.class)
|
||||||
.putExtra(FolderPickerActivity.EXTRA_INITIAL_DIRECTORY,
|
.putExtra(FolderPickerActivity.EXTRA_INITIAL_DIRECTORY,
|
||||||
(mRepo.Directory.length() != 0)
|
(mFolder.Path.length() != 0)
|
||||||
? mRepo.Directory
|
? mFolder.Path
|
||||||
: Environment.getExternalStorageDirectory().getAbsolutePath()
|
: Environment.getExternalStorageDirectory().getAbsolutePath()
|
||||||
);
|
);
|
||||||
startActivityForResult(intent, DIRECTORY_REQUEST_CODE);
|
startActivityForResult(intent, DIRECTORY_REQUEST_CODE);
|
||||||
} else if (preference.equals(mNodes) && mSyncthingService.getApi().getNodes().isEmpty()) {
|
} else if (preference.equals(mDevices) && mSyncthingService.getApi().getDevices().isEmpty()) {
|
||||||
Toast.makeText(getActivity(), R.string.no_nodes, Toast.LENGTH_SHORT)
|
Toast.makeText(getActivity(), R.string.no_devices, Toast.LENGTH_SHORT)
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -293,15 +293,15 @@ public class RepoSettingsFragment extends PreferenceFragment
|
||||||
@Override
|
@Override
|
||||||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||||
if (resultCode == Activity.RESULT_OK && requestCode == DIRECTORY_REQUEST_CODE) {
|
if (resultCode == Activity.RESULT_OK && requestCode == DIRECTORY_REQUEST_CODE) {
|
||||||
mRepo.Directory = data.getStringExtra(FolderPickerActivity.EXTRA_RESULT_DIRECTORY);
|
mFolder.Path = data.getStringExtra(FolderPickerActivity.EXTRA_RESULT_DIRECTORY);
|
||||||
mDirectory.setSummary(mRepo.Directory);
|
mDirectory.setSummary(mFolder.Path);
|
||||||
repoUpdated();
|
folderUpdated();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void repoUpdated() {
|
private void folderUpdated() {
|
||||||
if (!mIsCreate) {
|
if (!mIsCreate) {
|
||||||
mSyncthingService.getApi().editRepo(mRepo, false, getActivity());
|
mSyncthingService.getApi().editFolder(mFolder, false, getActivity());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,18 +10,18 @@ import com.nutomic.syncthingandroid.R;
|
||||||
import com.nutomic.syncthingandroid.activities.MainActivity;
|
import com.nutomic.syncthingandroid.activities.MainActivity;
|
||||||
import com.nutomic.syncthingandroid.activities.SettingsActivity;
|
import com.nutomic.syncthingandroid.activities.SettingsActivity;
|
||||||
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
|
import com.nutomic.syncthingandroid.syncthing.SyncthingService;
|
||||||
import com.nutomic.syncthingandroid.util.ReposAdapter;
|
import com.nutomic.syncthingandroid.util.FoldersAdapter;
|
||||||
|
|
||||||
import java.util.Timer;
|
import java.util.Timer;
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays a list of all existing repositories.
|
* Displays a list of all existing folders.
|
||||||
*/
|
*/
|
||||||
public class ReposFragment extends ListFragment implements SyncthingService.OnApiChangeListener,
|
public class FoldersFragment extends ListFragment implements SyncthingService.OnApiChangeListener,
|
||||||
AdapterView.OnItemClickListener {
|
AdapterView.OnItemClickListener {
|
||||||
|
|
||||||
private ReposAdapter mAdapter;
|
private FoldersAdapter mAdapter;
|
||||||
|
|
||||||
private Timer mTimer;
|
private Timer mTimer;
|
||||||
|
|
||||||
|
@ -51,10 +51,10 @@ public class ReposFragment extends ListFragment implements SyncthingService.OnAp
|
||||||
if (activity == null || activity.getApi() == null)
|
if (activity == null || activity.getApi() == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mAdapter = new ReposAdapter(activity);
|
mAdapter = new FoldersAdapter(activity);
|
||||||
mAdapter.add(activity.getApi().getRepos());
|
mAdapter.add(activity.getApi().getFolders());
|
||||||
setListAdapter(mAdapter);
|
setListAdapter(mAdapter);
|
||||||
setEmptyText(getString(R.string.repositories_list_empty));
|
setEmptyText(getString(R.string.folder_list_empty));
|
||||||
getListView().setOnItemClickListener(this);
|
getListView().setOnItemClickListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ public class ReposFragment extends ListFragment implements SyncthingService.OnAp
|
||||||
Intent intent = new Intent(getActivity(), SettingsActivity.class)
|
Intent intent = new Intent(getActivity(), SettingsActivity.class)
|
||||||
.setAction(SettingsActivity.ACTION_REPO_SETTINGS_FRAGMENT)
|
.setAction(SettingsActivity.ACTION_REPO_SETTINGS_FRAGMENT)
|
||||||
.putExtra(SettingsActivity.EXTRA_IS_CREATE, false)
|
.putExtra(SettingsActivity.EXTRA_IS_CREATE, false)
|
||||||
.putExtra(RepoSettingsFragment.EXTRA_REPO_ID, mAdapter.getItem(i).ID);
|
.putExtra(FolderSettingsFragment.EXTRA_REPO_ID, mAdapter.getItem(i).ID);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,12 +23,12 @@ import java.util.Timer;
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays information about the local node.
|
* Displays information about the local device.
|
||||||
*/
|
*/
|
||||||
public class LocalNodeInfoFragment extends Fragment
|
public class LocalDeviceInfoFragment extends Fragment
|
||||||
implements RestApi.OnReceiveSystemInfoListener, RestApi.OnReceiveConnectionsListener {
|
implements RestApi.OnReceiveSystemInfoListener, RestApi.OnReceiveConnectionsListener {
|
||||||
|
|
||||||
private TextView mNodeId;
|
private TextView mDeviceId;
|
||||||
|
|
||||||
private TextView mCpuUsage;
|
private TextView mCpuUsage;
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ public class LocalNodeInfoFragment extends Fragment
|
||||||
@Override
|
@Override
|
||||||
public void onDrawerOpened(View drawerView) {
|
public void onDrawerOpened(View drawerView) {
|
||||||
super.onDrawerOpened(drawerView);
|
super.onDrawerOpened(drawerView);
|
||||||
LocalNodeInfoFragment.this.onDrawerOpened();
|
LocalDeviceInfoFragment.this.onDrawerOpened();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,8 +72,8 @@ public class LocalNodeInfoFragment extends Fragment
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
View view = inflater.inflate(R.layout.local_node_info_fragment, container, false);
|
View view = inflater.inflate(R.layout.local_device_info_fragment, container, false);
|
||||||
mNodeId = (TextView) view.findViewById(R.id.node_id);
|
mDeviceId = (TextView) view.findViewById(R.id.device_id);
|
||||||
mCpuUsage = (TextView) view.findViewById(R.id.cpu_usage);
|
mCpuUsage = (TextView) view.findViewById(R.id.cpu_usage);
|
||||||
mRamUsage = (TextView) view.findViewById(R.id.ram_usage);
|
mRamUsage = (TextView) view.findViewById(R.id.ram_usage);
|
||||||
mDownload = (TextView) view.findViewById(R.id.download);
|
mDownload = (TextView) view.findViewById(R.id.download);
|
||||||
|
@ -131,11 +131,11 @@ public class LocalNodeInfoFragment extends Fragment
|
||||||
if (getActivity() == null)
|
if (getActivity() == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mNodeId.setText(info.myID);
|
mDeviceId.setText(info.myID);
|
||||||
mNodeId.setOnTouchListener(new View.OnTouchListener() {
|
mDeviceId.setOnTouchListener(new View.OnTouchListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onTouch(View view, MotionEvent motionEvent) {
|
public boolean onTouch(View view, MotionEvent motionEvent) {
|
||||||
mActivity.getApi().copyNodeId(mNodeId.getText().toString());
|
mActivity.getApi().copyDeviceId(mDeviceId.getText().toString());
|
||||||
view.performClick();
|
view.performClick();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -156,19 +156,19 @@ public class LocalNodeInfoFragment extends Fragment
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void onReceiveConnections(Map<String, RestApi.Connection> connections) {
|
public void onReceiveConnections(Map<String, RestApi.Connection> connections) {
|
||||||
RestApi.Connection c = connections.get(RestApi.LOCAL_NODE_CONNECTIONS);
|
RestApi.Connection c = connections.get(RestApi.LOCAL_DEVICE_CONNECTIONS);
|
||||||
mDownload.setText(RestApi.readableTransferRate(mActivity, c.InBits));
|
mDownload.setText(RestApi.readableTransferRate(mActivity, c.InBits));
|
||||||
mUpload.setText(RestApi.readableTransferRate(mActivity, c.OutBits));
|
mUpload.setText(RestApi.readableTransferRate(mActivity, c.OutBits));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shares the local node ID when "share" is clicked.
|
* Shares the local device ID when "share" is clicked.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
case R.id.share_node_id:
|
case R.id.share_device_id:
|
||||||
RestApi.shareNodeId(getActivity(), mNodeId.getText().toString());
|
RestApi.shareDeviceId(getActivity(), mDeviceId.getText().toString());
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
|
@ -37,7 +37,7 @@ public class GetTask extends AsyncTask<String, Void, String> {
|
||||||
|
|
||||||
public static final String URI_MODEL = "/rest/model";
|
public static final String URI_MODEL = "/rest/model";
|
||||||
|
|
||||||
public static final String URI_NODEID = "/rest/nodeid";
|
public static final String URI_DEVICEID = "/rest/deviceid";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* params[0] Syncthing hostname
|
* params[0] Syncthing hostname
|
||||||
|
|
|
@ -18,13 +18,12 @@ import android.widget.Toast;
|
||||||
|
|
||||||
import com.nutomic.syncthingandroid.BuildConfig;
|
import com.nutomic.syncthingandroid.BuildConfig;
|
||||||
import com.nutomic.syncthingandroid.R;
|
import com.nutomic.syncthingandroid.R;
|
||||||
import com.nutomic.syncthingandroid.util.RepoObserver;
|
import com.nutomic.syncthingandroid.util.FolderObserver;
|
||||||
|
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -36,7 +35,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||||
* Provides functions to interact with the syncthing REST API.
|
* Provides functions to interact with the syncthing REST API.
|
||||||
*/
|
*/
|
||||||
public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
||||||
RepoObserver.OnRepoFileChangeListener {
|
FolderObserver.OnFolderFileChangeListener {
|
||||||
|
|
||||||
private static final String TAG = "RestApi";
|
private static final String TAG = "RestApi";
|
||||||
|
|
||||||
|
@ -56,15 +55,15 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
||||||
public static final String HEADER_API_KEY = "X-API-Key";
|
public static final String HEADER_API_KEY = "X-API-Key";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Key of the map element containing connection info for the local node, in the return
|
* Key of the map element containing connection info for the local device, in the return
|
||||||
* value of {@link #getConnections}
|
* value of {@link #getConnections}
|
||||||
*/
|
*/
|
||||||
public static final String LOCAL_NODE_CONNECTIONS = "total";
|
public static final String LOCAL_DEVICE_CONNECTIONS = "total";
|
||||||
|
|
||||||
public static class Node {
|
public static class Device {
|
||||||
public String Addresses;
|
public String Addresses;
|
||||||
public String Name;
|
public String Name;
|
||||||
public String NodeID;
|
public String DeviceID;
|
||||||
public boolean Compression;
|
public boolean Compression;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,11 +76,11 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
||||||
public long sys;
|
public long sys;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Repo {
|
public static class Folder {
|
||||||
public String Directory;
|
public String Path;
|
||||||
public String ID;
|
public String ID;
|
||||||
public String Invalid;
|
public String Invalid;
|
||||||
public List<String> NodeIds;
|
public List<String> DeviceIds;
|
||||||
public boolean ReadOnly;
|
public boolean ReadOnly;
|
||||||
public int RescanIntervalS;
|
public int RescanIntervalS;
|
||||||
public Versioning Versioning;
|
public Versioning Versioning;
|
||||||
|
@ -148,7 +147,7 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
||||||
|
|
||||||
private JSONObject mConfig;
|
private JSONObject mConfig;
|
||||||
|
|
||||||
private String mLocalNodeId;
|
private String mLocalDeviceId;
|
||||||
|
|
||||||
private boolean mRestartPostponed = false;
|
private boolean mRestartPostponed = false;
|
||||||
|
|
||||||
|
@ -164,8 +163,8 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
||||||
private long mPreviousConnectionTime = 0;
|
private long mPreviousConnectionTime = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stores the latest result of {@link #getModel(String, OnReceiveModelListener)} for each repo,
|
* Stores the latest result of {@link #getModel(String, OnReceiveModelListener)} for each folder,
|
||||||
* for calculating node percentage in {@link #getConnections(OnReceiveConnectionsListener)}.
|
* for calculating device percentage in {@link #getConnections(OnReceiveConnectionsListener)}.
|
||||||
*/
|
*/
|
||||||
private HashMap<String, Model> mCachedModelInfo = new HashMap<>();
|
private HashMap<String, Model> mCachedModelInfo = new HashMap<>();
|
||||||
|
|
||||||
|
@ -193,18 +192,24 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
||||||
private OnApiAvailableListener mOnApiAvailableListener;
|
private OnApiAvailableListener mOnApiAvailableListener;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets local node id, syncthing version and config, then calls all OnApiAvailableListeners.
|
* Gets local device id, syncthing version and config, then calls all OnApiAvailableListeners.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void onWebGuiAvailable() {
|
public void onWebGuiAvailable() {
|
||||||
mAvailableCount.set(0);
|
mAvailableCount.set(0);
|
||||||
new GetTask() {
|
new GetTask() {
|
||||||
@Override
|
@Override
|
||||||
protected void onPostExecute(String version) {
|
protected void onPostExecute(String s) {
|
||||||
mVersion = version;
|
try {
|
||||||
|
JSONObject json = new JSONObject(s);
|
||||||
|
mVersion = json.getString("version");
|
||||||
Log.i(TAG, "Syncthing version is " + mVersion);
|
Log.i(TAG, "Syncthing version is " + mVersion);
|
||||||
tryIsAvailable();
|
tryIsAvailable();
|
||||||
}
|
}
|
||||||
|
catch (JSONException e) {
|
||||||
|
Log.w(TAG, "Failed to parse config", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
}.execute(mUrl, GetTask.URI_VERSION, mApiKey);
|
}.execute(mUrl, GetTask.URI_VERSION, mApiKey);
|
||||||
new GetTask() {
|
new GetTask() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -220,7 +225,7 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
||||||
getSystemInfo(new OnReceiveSystemInfoListener() {
|
getSystemInfo(new OnReceiveSystemInfoListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onReceiveSystemInfo(SystemInfo info) {
|
public void onReceiveSystemInfo(SystemInfo info) {
|
||||||
mLocalNodeId = info.myID;
|
mLocalDeviceId = info.myID;
|
||||||
tryIsAvailable();
|
tryIsAvailable();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -377,16 +382,16 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of all existing nodes.
|
* Returns a list of all existing devices.
|
||||||
*/
|
*/
|
||||||
public List<Node> getNodes() {
|
public List<Device> getDevices() {
|
||||||
if (mConfig == null)
|
if (mConfig == null)
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return getNodes(mConfig.getJSONArray("Nodes"));
|
return getDevices(mConfig.getJSONArray("Devices"));
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
Log.w(TAG, "Failed to read nodes", e);
|
Log.w(TAG, "Failed to read devices", e);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -428,21 +433,22 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of all nodes in the array nodes, excluding the local node.
|
* Returns a list of all devices in the array devices, excluding the local device.
|
||||||
*/
|
*/
|
||||||
private List<Node> getNodes(JSONArray nodes) throws JSONException {
|
private List<Device> getDevices(JSONArray devices) throws JSONException {
|
||||||
List<Node> ret;
|
List<Device> ret = new ArrayList<>(devices.length());
|
||||||
ret = new ArrayList<>(nodes.length());
|
for (int i = 0; i < devices.length(); i++) {
|
||||||
for (int i = 0; i < nodes.length(); i++) {
|
JSONObject json = devices.getJSONObject(i);
|
||||||
JSONObject json = nodes.getJSONObject(i);
|
Device n = new Device();
|
||||||
Node n = new Node();
|
// TODO
|
||||||
|
//n.Addresses = json.optJSONArray("Addresses").join(" ").replace("\"", "");
|
||||||
if (!json.isNull("Addresses")) {
|
if (!json.isNull("Addresses")) {
|
||||||
n.Addresses = json.getJSONArray("Addresses").join(" ").replace("\"", "");
|
n.Addresses = json.getJSONArray("Addresses").join(" ").replace("\"", "");
|
||||||
}
|
}
|
||||||
n.Name = json.getString("Name");
|
n.Name = json.getString("Name");
|
||||||
n.NodeID = json.getString("NodeID");
|
n.DeviceID = json.getString("DeviceID");
|
||||||
n.Compression = json.getBoolean("Compression");
|
n.Compression = json.getBoolean("Compression");
|
||||||
if (!n.NodeID.equals(mLocalNodeId)) {
|
if (!n.DeviceID.equals(mLocalDeviceId)) {
|
||||||
ret.add(n);
|
ret.add(n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -450,29 +456,29 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of all existing repositores.
|
* Returns a list of all existing foldersitores.
|
||||||
*/
|
*/
|
||||||
public List<Repo> getRepos() {
|
public List<Folder> getFolders() {
|
||||||
if (mConfig == null)
|
if (mConfig == null)
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
|
|
||||||
List<Repo> ret;
|
List<Folder> ret;
|
||||||
try {
|
try {
|
||||||
JSONArray repos = mConfig.getJSONArray("Repositories");
|
JSONArray folders = mConfig.getJSONArray("Folders");
|
||||||
ret = new ArrayList<>(repos.length());
|
ret = new ArrayList<>(folders.length());
|
||||||
for (int i = 0; i < repos.length(); i++) {
|
for (int i = 0; i < folders.length(); i++) {
|
||||||
JSONObject json = repos.getJSONObject(i);
|
JSONObject json = folders.getJSONObject(i);
|
||||||
Repo r = new Repo();
|
Folder r = new Folder();
|
||||||
r.Directory = json.getString("Directory");
|
r.Path = json.getString("Path");
|
||||||
r.ID = json.getString("ID");
|
r.ID = json.getString("ID");
|
||||||
r.Invalid = json.getString("Invalid");
|
r.Invalid = json.getString("Invalid");
|
||||||
r.NodeIds = new ArrayList<>();
|
r.DeviceIds = new ArrayList<>();
|
||||||
JSONArray nodes = json.getJSONArray("Nodes");
|
JSONArray devices = json.getJSONArray("Devices");
|
||||||
for (int j = 0; j < nodes.length(); j++) {
|
for (int j = 0; j < devices.length(); j++) {
|
||||||
JSONObject n = nodes.getJSONObject(j);
|
JSONObject n = devices.getJSONObject(j);
|
||||||
r.NodeIds.add(n.getString("NodeID"));
|
r.DeviceIds.add(n.getString("DeviceID"));
|
||||||
}
|
}
|
||||||
r.NodeIds.add(mLocalNodeId);
|
r.DeviceIds.add(mLocalDeviceId);
|
||||||
|
|
||||||
r.ReadOnly = json.getBoolean("ReadOnly");
|
r.ReadOnly = json.getBoolean("ReadOnly");
|
||||||
r.RescanIntervalS = json.getInt("RescanIntervalS");
|
r.RescanIntervalS = json.getInt("RescanIntervalS");
|
||||||
|
@ -489,7 +495,7 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
||||||
ret.add(r);
|
ret.add(r);
|
||||||
}
|
}
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
Log.w(TAG, "Failed to read nodes", e);
|
Log.w(TAG, "Failed to read devices", e);
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -523,7 +529,7 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
||||||
public interface OnReceiveConnectionsListener {
|
public interface OnReceiveConnectionsListener {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param connections Map from Node ID to {@link Connection}.
|
* @param connections Map from Device ID to {@link Connection}.
|
||||||
* <p/>
|
* <p/>
|
||||||
* NOTE: The parameter connections is cached internally. Do not modify it or
|
* NOTE: The parameter connections is cached internally. Do not modify it or
|
||||||
* any of its contents.
|
* any of its contents.
|
||||||
|
@ -532,9 +538,9 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns connection info for the local node and all connected nodes.
|
* Returns connection info for the local device and all connected devices.
|
||||||
* <p/>
|
* <p/>
|
||||||
* Use the key {@link #LOCAL_NODE_CONNECTIONS} to get connection info for the local node.
|
* Use the key {@link #LOCAL_DEVICE_CONNECTIONS} to get connection info for the local device.
|
||||||
*/
|
*/
|
||||||
public void getConnections(final OnReceiveConnectionsListener listener) {
|
public void getConnections(final OnReceiveConnectionsListener listener) {
|
||||||
new GetTask() {
|
new GetTask() {
|
||||||
|
@ -554,19 +560,19 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
||||||
JSONObject json = new JSONObject(s);
|
JSONObject json = new JSONObject(s);
|
||||||
String[] names = json.names().join(" ").replace("\"", "").split(" ");
|
String[] names = json.names().join(" ").replace("\"", "").split(" ");
|
||||||
HashMap<String, Connection> connections = new HashMap<String, Connection>();
|
HashMap<String, Connection> connections = new HashMap<String, Connection>();
|
||||||
for (String nodeId : names) {
|
for (String deviceId : names) {
|
||||||
Connection c = new Connection();
|
Connection c = new Connection();
|
||||||
JSONObject conn = json.getJSONObject(nodeId);
|
JSONObject conn = json.getJSONObject(deviceId);
|
||||||
c.Address = nodeId;
|
c.Address = deviceId;
|
||||||
c.At = conn.getString("At");
|
c.At = conn.getString("At");
|
||||||
c.InBytesTotal = conn.getLong("InBytesTotal");
|
c.InBytesTotal = conn.getLong("InBytesTotal");
|
||||||
c.OutBytesTotal = conn.getLong("OutBytesTotal");
|
c.OutBytesTotal = conn.getLong("OutBytesTotal");
|
||||||
c.Address = conn.getString("Address");
|
c.Address = conn.getString("Address");
|
||||||
c.ClientVersion = conn.getString("ClientVersion");
|
c.ClientVersion = conn.getString("ClientVersion");
|
||||||
c.Completion = getNodeCompletion(nodeId);
|
c.Completion = getDeviceCompletion(deviceId);
|
||||||
|
|
||||||
Connection prev = (mPreviousConnections.containsKey(nodeId))
|
Connection prev = (mPreviousConnections.containsKey(deviceId))
|
||||||
? mPreviousConnections.get(nodeId)
|
? mPreviousConnections.get(deviceId)
|
||||||
: new Connection();
|
: new Connection();
|
||||||
mPreviousConnectionTime = now;
|
mPreviousConnectionTime = now;
|
||||||
if (difference != 0) {
|
if (difference != 0) {
|
||||||
|
@ -576,7 +582,7 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
||||||
(conn.getLong("OutBytesTotal") - prev.OutBytesTotal) / difference);
|
(conn.getLong("OutBytesTotal") - prev.OutBytesTotal) / difference);
|
||||||
}
|
}
|
||||||
|
|
||||||
connections.put(nodeId, c);
|
connections.put(deviceId, c);
|
||||||
|
|
||||||
}
|
}
|
||||||
mPreviousConnections = connections;
|
mPreviousConnections = connections;
|
||||||
|
@ -589,17 +595,17 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculates completion percentage for the given node using {@link #mCachedModelInfo}.
|
* Calculates completion percentage for the given device using {@link #mCachedModelInfo}.
|
||||||
*/
|
*/
|
||||||
private int getNodeCompletion(String nodeId) {
|
private int getDeviceCompletion(String deviceId) {
|
||||||
int repoCount = 0;
|
int folderCount = 0;
|
||||||
float percentageSum = 0;
|
float percentageSum = 0;
|
||||||
for (String id : mCachedModelInfo.keySet()) {
|
for (String id : mCachedModelInfo.keySet()) {
|
||||||
boolean isShared = false;
|
boolean isShared = false;
|
||||||
outerloop:
|
outerloop:
|
||||||
for (Repo r : getRepos()) {
|
for (Folder r : getFolders()) {
|
||||||
for (String n : r.NodeIds) {
|
for (String n : r.DeviceIds) {
|
||||||
if (n.equals(nodeId)) {
|
if (n.equals(deviceId)) {
|
||||||
isShared = true;
|
isShared = true;
|
||||||
break outerloop;
|
break outerloop;
|
||||||
}
|
}
|
||||||
|
@ -612,11 +618,11 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
||||||
percentageSum += (global != 0)
|
percentageSum += (global != 0)
|
||||||
? (local * 100f) / global
|
? (local * 100f) / global
|
||||||
: 100f;
|
: 100f;
|
||||||
repoCount++;
|
folderCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (repoCount != 0)
|
return (folderCount != 0)
|
||||||
? (int) percentageSum / repoCount
|
? (int) percentageSum / folderCount
|
||||||
: 100;
|
: 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -625,13 +631,13 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
||||||
* Listener for {@link #getModel}.
|
* Listener for {@link #getModel}.
|
||||||
*/
|
*/
|
||||||
public interface OnReceiveModelListener {
|
public interface OnReceiveModelListener {
|
||||||
public void onReceiveModel(String repoId, Model model);
|
public void onReceiveModel(String folderId, Model model);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns status information about the repo with the given ID.
|
* Returns status information about the folder with the given ID.
|
||||||
*/
|
*/
|
||||||
public void getModel(final String repoId, final OnReceiveModelListener listener) {
|
public void getModel(final String folderId, final OnReceiveModelListener listener) {
|
||||||
new GetTask() {
|
new GetTask() {
|
||||||
@Override
|
@Override
|
||||||
protected void onPostExecute(String s) {
|
protected void onPostExecute(String s) {
|
||||||
|
@ -653,62 +659,62 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
||||||
m.needFiles = json.getLong("needFiles");
|
m.needFiles = json.getLong("needFiles");
|
||||||
m.state = json.getString("state");
|
m.state = json.getString("state");
|
||||||
m.invalid = json.optString("invalid");
|
m.invalid = json.optString("invalid");
|
||||||
mCachedModelInfo.put(repoId, m);
|
mCachedModelInfo.put(folderId, m);
|
||||||
listener.onReceiveModel(repoId, m);
|
listener.onReceiveModel(folderId, m);
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
Log.w(TAG, "Failed to read repository info", e);
|
Log.w(TAG, "Failed to read folder info", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.execute(mUrl, GetTask.URI_MODEL, mApiKey, "repo", repoId);
|
}.execute(mUrl, GetTask.URI_MODEL, mApiKey, "folder", folderId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates or creates the given node, depending on whether it already exists.
|
* Updates or creates the given device, depending on whether it already exists.
|
||||||
*
|
*
|
||||||
* @param node Settings of the node to edit. To create a node, pass a non-existant node ID.
|
* @param device Settings of the device to edit. To create a device, pass a non-existant device ID.
|
||||||
* @param listener {@link OnNodeIdNormalizedListener} for the normalized node ID.
|
* @param listener {@link OnDeviceIdNormalizedListener} for the normalized device ID.
|
||||||
*/
|
*/
|
||||||
public void editNode(final Node node, final Activity activity,
|
public void editDevice(final Device device, final Activity activity,
|
||||||
final OnNodeIdNormalizedListener listener) {
|
final OnDeviceIdNormalizedListener listener) {
|
||||||
normalizeNodeId(node.NodeID,
|
normalizeDeviceId(device.DeviceID,
|
||||||
new RestApi.OnNodeIdNormalizedListener() {
|
new RestApi.OnDeviceIdNormalizedListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onNodeIdNormalized(String normalizedId, String error) {
|
public void onDeviceIdNormalized(String normalizedId, String error) {
|
||||||
listener.onNodeIdNormalized(normalizedId, error);
|
listener.onDeviceIdNormalized(normalizedId, error);
|
||||||
if (normalizedId == null)
|
if (normalizedId == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
node.NodeID = normalizedId;
|
device.DeviceID = normalizedId;
|
||||||
// If the node already exists, just update it.
|
// If the device already exists, just update it.
|
||||||
boolean create = true;
|
boolean create = true;
|
||||||
for (RestApi.Node n : getNodes()) {
|
for (RestApi.Device n : getDevices()) {
|
||||||
if (n.NodeID.equals(node.NodeID)) {
|
if (n.DeviceID.equals(device.DeviceID)) {
|
||||||
create = false;
|
create = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
JSONArray nodes = mConfig.getJSONArray("Nodes");
|
JSONArray devices = mConfig.getJSONArray("Devices");
|
||||||
JSONObject n = null;
|
JSONObject n = null;
|
||||||
if (create) {
|
if (create) {
|
||||||
n = new JSONObject();
|
n = new JSONObject();
|
||||||
nodes.put(n);
|
devices.put(n);
|
||||||
} else {
|
} else {
|
||||||
for (int i = 0; i < nodes.length(); i++) {
|
for (int i = 0; i < devices.length(); i++) {
|
||||||
JSONObject json = nodes.getJSONObject(i);
|
JSONObject json = devices.getJSONObject(i);
|
||||||
if (node.NodeID.equals(json.getString("NodeID"))) {
|
if (device.DeviceID.equals(json.getString("DeviceID"))) {
|
||||||
n = nodes.getJSONObject(i);
|
n = devices.getJSONObject(i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
n.put("NodeID", node.NodeID);
|
n.put("DeviceID", device.DeviceID);
|
||||||
n.put("Name", node.Name);
|
n.put("Name", device.Name);
|
||||||
n.put("Addresses", listToJson(node.Addresses.split(" ")));
|
n.put("Addresses", listToJson(device.Addresses.split(" ")));
|
||||||
n.put("Compression", node.Compression);
|
n.put("Compression", device.Compression);
|
||||||
requireRestart(activity);
|
requireRestart(activity);
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
Log.w(TAG, "Failed to read nodes", e);
|
Log.w(TAG, "Failed to read devices", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -716,93 +722,93 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes the given node from syncthing.
|
* Deletes the given device from syncthing.
|
||||||
*/
|
*/
|
||||||
public boolean deleteNode(Node node, Activity activity) {
|
public boolean deleteDevice(Device device, Activity activity) {
|
||||||
try {
|
try {
|
||||||
JSONArray nodes = mConfig.getJSONArray("Nodes");
|
JSONArray devices = mConfig.getJSONArray("Devices");
|
||||||
|
|
||||||
for (int i = 0; i < nodes.length(); i++) {
|
for (int i = 0; i < devices.length(); i++) {
|
||||||
JSONObject json = nodes.getJSONObject(i);
|
JSONObject json = devices.getJSONObject(i);
|
||||||
if (node.NodeID.equals(json.getString("NodeID"))) {
|
if (device.DeviceID.equals(json.getString("DeviceID"))) {
|
||||||
mConfig.remove("Nodes");
|
mConfig.remove("Devices");
|
||||||
mConfig.put("Nodes", delete(nodes, nodes.getJSONObject(i)));
|
mConfig.put("Devices", delete(devices, devices.getJSONObject(i)));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
requireRestart(activity);
|
requireRestart(activity);
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
Log.w(TAG, "Failed to edit repo", e);
|
Log.w(TAG, "Failed to edit folder", e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates or creates the given node.
|
* Updates or creates the given device.
|
||||||
*/
|
*/
|
||||||
public boolean editRepo(Repo repo, boolean create, Activity activity) {
|
public boolean editFolder(Folder folder, boolean create, Activity activity) {
|
||||||
try {
|
try {
|
||||||
JSONArray repos = mConfig.getJSONArray("Repositories");
|
JSONArray folders = mConfig.getJSONArray("Folder");
|
||||||
JSONObject r = null;
|
JSONObject r = null;
|
||||||
if (create) {
|
if (create) {
|
||||||
r = new JSONObject();
|
r = new JSONObject();
|
||||||
repos.put(r);
|
folders.put(r);
|
||||||
} else {
|
} else {
|
||||||
for (int i = 0; i < repos.length(); i++) {
|
for (int i = 0; i < folders.length(); i++) {
|
||||||
JSONObject json = repos.getJSONObject(i);
|
JSONObject json = folders.getJSONObject(i);
|
||||||
if (repo.ID.equals(json.getString("ID"))) {
|
if (folder.ID.equals(json.getString("ID"))) {
|
||||||
r = repos.getJSONObject(i);
|
r = folders.getJSONObject(i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
r.put("Directory", repo.Directory);
|
r.put("Path", folder.Path);
|
||||||
r.put("ID", repo.ID);
|
r.put("ID", folder.ID);
|
||||||
r.put("IgnorePerms", true);
|
r.put("IgnorePerms", true);
|
||||||
r.put("ReadOnly", repo.ReadOnly);
|
r.put("ReadOnly", folder.ReadOnly);
|
||||||
JSONArray nodes = new JSONArray();
|
JSONArray devices = new JSONArray();
|
||||||
for (String n : repo.NodeIds) {
|
for (String n : folder.DeviceIds) {
|
||||||
JSONObject element = new JSONObject();
|
JSONObject element = new JSONObject();
|
||||||
element.put("NodeID", n);
|
element.put("DeviceID", n);
|
||||||
nodes.put(element);
|
devices.put(element);
|
||||||
}
|
}
|
||||||
r.put("Nodes", nodes);
|
r.put("Devices", devices);
|
||||||
JSONObject versioning = new JSONObject();
|
JSONObject versioning = new JSONObject();
|
||||||
versioning.put("Type", repo.Versioning.getType());
|
versioning.put("Type", folder.Versioning.getType());
|
||||||
JSONObject params = new JSONObject();
|
JSONObject params = new JSONObject();
|
||||||
versioning.put("Params", params);
|
versioning.put("Params", params);
|
||||||
for (String key : repo.Versioning.getParams().keySet()) {
|
for (String key : folder.Versioning.getParams().keySet()) {
|
||||||
params.put(key, repo.Versioning.getParams().get(key));
|
params.put(key, folder.Versioning.getParams().get(key));
|
||||||
}
|
}
|
||||||
r.put("RescanIntervalS", repo.RescanIntervalS);
|
r.put("RescanIntervalS", folder.RescanIntervalS);
|
||||||
r.put("Versioning", versioning);
|
r.put("Versioning", versioning);
|
||||||
requireRestart(activity);
|
requireRestart(activity);
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
Log.w(TAG, "Failed to edit repo " + repo.ID + " at " + repo.Directory, e);
|
Log.w(TAG, "Failed to edit folder " + folder.ID + " at " + folder.Path, e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes the given repository from syncthing.
|
* Deletes the given folder from syncthing.
|
||||||
*/
|
*/
|
||||||
public boolean deleteRepo(Repo repo, Activity activity) {
|
public boolean deleteFolder(Folder folder, Activity activity) {
|
||||||
try {
|
try {
|
||||||
JSONArray repos = mConfig.getJSONArray("Repositories");
|
JSONArray folders = mConfig.getJSONArray("Folder");
|
||||||
|
|
||||||
for (int i = 0; i < repos.length(); i++) {
|
for (int i = 0; i < folders.length(); i++) {
|
||||||
JSONObject json = repos.getJSONObject(i);
|
JSONObject json = folders.getJSONObject(i);
|
||||||
if (repo.ID.equals(json.getString("ID"))) {
|
if (folder.ID.equals(json.getString("ID"))) {
|
||||||
mConfig.remove("Repositories");
|
mConfig.remove("Folder");
|
||||||
mConfig.put("Repositories", delete(repos, repos.getJSONObject(i)));
|
mConfig.put("Folder", delete(folders, folders.getJSONObject(i)));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
requireRestart(activity);
|
requireRestart(activity);
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
Log.w(TAG, "Failed to edit repo", e);
|
Log.w(TAG, "Failed to edit folder", e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -822,22 +828,22 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Result listener for {@link #normalizeNodeId(String, OnNodeIdNormalizedListener)}.
|
* Result listener for {@link #normalizeDeviceId(String, OnDeviceIdNormalizedListener)}.
|
||||||
*/
|
*/
|
||||||
public interface OnNodeIdNormalizedListener {
|
public interface OnDeviceIdNormalizedListener {
|
||||||
/**
|
/**
|
||||||
* On any call, exactly one parameter will be null.
|
* On any call, exactly one parameter will be null.
|
||||||
*
|
*
|
||||||
* @param normalizedId The normalized node ID, or null on error.
|
* @param normalizedId The normalized device ID, or null on error.
|
||||||
* @param error An error message, or null on success.
|
* @param error An error message, or null on success.
|
||||||
*/
|
*/
|
||||||
public void onNodeIdNormalized(String normalizedId, String error);
|
public void onDeviceIdNormalized(String normalizedId, String error);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Normalizes a given node ID.
|
* Normalizes a given device ID.
|
||||||
*/
|
*/
|
||||||
public void normalizeNodeId(String id, final OnNodeIdNormalizedListener listener) {
|
public void normalizeDeviceId(String id, final OnDeviceIdNormalizedListener listener) {
|
||||||
new GetTask() {
|
new GetTask() {
|
||||||
@Override
|
@Override
|
||||||
protected void onPostExecute(String s) {
|
protected void onPostExecute(String s) {
|
||||||
|
@ -846,35 +852,36 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
||||||
String error = null;
|
String error = null;
|
||||||
try {
|
try {
|
||||||
JSONObject json = new JSONObject(s);
|
JSONObject json = new JSONObject(s);
|
||||||
|
Log.d(TAG, s);
|
||||||
normalized = json.optString("id", null);
|
normalized = json.optString("id", null);
|
||||||
error = json.optString("error", null);
|
error = json.optString("error", null);
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
Log.w(TAG, "Failed to parse normalized node ID JSON", e);
|
Log.w(TAG, "Failed to parse normalized device ID JSON", e);
|
||||||
}
|
}
|
||||||
listener.onNodeIdNormalized(normalized, error);
|
listener.onDeviceIdNormalized(normalized, error);
|
||||||
}
|
}
|
||||||
}.execute(mUrl, GetTask.URI_NODEID, mApiKey, "id", id);
|
}.execute(mUrl, GetTask.URI_DEVICEID, mApiKey, "id", id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shares the given node id via Intent. Must be called from an Activity.
|
* Shares the given device id via Intent. Must be called from an Activity.
|
||||||
*/
|
*/
|
||||||
public static void shareNodeId(Context context, String id) {
|
public static void shareDeviceId(Context context, String id) {
|
||||||
Intent shareIntent = new Intent();
|
Intent shareIntent = new Intent();
|
||||||
shareIntent.setAction(Intent.ACTION_SEND);
|
shareIntent.setAction(Intent.ACTION_SEND);
|
||||||
shareIntent.setType("text/plain");
|
shareIntent.setType("text/plain");
|
||||||
shareIntent.putExtra(android.content.Intent.EXTRA_TEXT, id);
|
shareIntent.putExtra(android.content.Intent.EXTRA_TEXT, id);
|
||||||
context.startActivity(Intent.createChooser(
|
context.startActivity(Intent.createChooser(
|
||||||
shareIntent, context.getString(R.string.send_node_id_to)));
|
shareIntent, context.getString(R.string.send_device_id_to)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copies the given node ID to the clipboard (and shows a Toast telling about it).
|
* Copies the given device ID to the clipboard (and shows a Toast telling about it).
|
||||||
*
|
*
|
||||||
* @param id The node ID to copy.
|
* @param id The device ID to copy.
|
||||||
*/
|
*/
|
||||||
@TargetApi(11)
|
@TargetApi(11)
|
||||||
public void copyNodeId(String id) {
|
public void copyDeviceId(String id) {
|
||||||
int sdk = android.os.Build.VERSION.SDK_INT;
|
int sdk = android.os.Build.VERSION.SDK_INT;
|
||||||
if (sdk < android.os.Build.VERSION_CODES.HONEYCOMB) {
|
if (sdk < android.os.Build.VERSION_CODES.HONEYCOMB) {
|
||||||
android.text.ClipboardManager clipboard = (android.text.ClipboardManager)
|
android.text.ClipboardManager clipboard = (android.text.ClipboardManager)
|
||||||
|
@ -883,19 +890,19 @@ public class RestApi implements SyncthingService.OnWebGuiAvailableListener,
|
||||||
} else {
|
} else {
|
||||||
ClipboardManager clipboard = (ClipboardManager)
|
ClipboardManager clipboard = (ClipboardManager)
|
||||||
mContext.getSystemService(Context.CLIPBOARD_SERVICE);
|
mContext.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||||
ClipData clip = ClipData.newPlainText(mContext.getString(R.string.node_id), id);
|
ClipData clip = ClipData.newPlainText(mContext.getString(R.string.device_id), id);
|
||||||
clipboard.setPrimaryClip(clip);
|
clipboard.setPrimaryClip(clip);
|
||||||
}
|
}
|
||||||
Toast.makeText(mContext, R.string.node_id_copied_to_clipboard, Toast.LENGTH_SHORT)
|
Toast.makeText(mContext, R.string.device_id_copied_to_clipboard, Toast.LENGTH_SHORT)
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Force a rescan of the given subdirectory in repository.
|
* Force a rescan of the given subdirectory in folder.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void onRepoFileChange(String repoId, String relativePath) {
|
public void onFolderFileChange(String folderId, String relativePath) {
|
||||||
new PostTask().execute(mUrl, PostTask.URI_SCAN, mApiKey, "repo", repoId, "sub",
|
new PostTask().execute(mUrl, PostTask.URI_SCAN, mApiKey, "folder", folderId, "sub",
|
||||||
relativePath);
|
relativePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ import android.util.Pair;
|
||||||
import com.nutomic.syncthingandroid.R;
|
import com.nutomic.syncthingandroid.R;
|
||||||
import com.nutomic.syncthingandroid.activities.SettingsActivity;
|
import com.nutomic.syncthingandroid.activities.SettingsActivity;
|
||||||
import com.nutomic.syncthingandroid.util.ConfigXml;
|
import com.nutomic.syncthingandroid.util.ConfigXml;
|
||||||
import com.nutomic.syncthingandroid.util.RepoObserver;
|
import com.nutomic.syncthingandroid.util.FolderObserver;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FilenameFilter;
|
import java.io.FilenameFilter;
|
||||||
|
@ -39,7 +39,7 @@ public class SyncthingService extends Service {
|
||||||
public static final String ACTION_RESTART = "restart";
|
public static final String ACTION_RESTART = "restart";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interval in ms at which the GUI is updated (eg {@link }LocalNodeInfoFragment}).
|
* Interval in ms at which the GUI is updated (eg {@link }LocalDeviceInfoFragment}).
|
||||||
*/
|
*/
|
||||||
public static final int GUI_UPDATE_INTERVAL = 1000;
|
public static final int GUI_UPDATE_INTERVAL = 1000;
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ public class SyncthingService extends Service {
|
||||||
|
|
||||||
private RestApi mApi;
|
private RestApi mApi;
|
||||||
|
|
||||||
private LinkedList<RepoObserver> mObservers = new LinkedList<>();
|
private LinkedList<FolderObserver> mObservers = new LinkedList<>();
|
||||||
|
|
||||||
private SyncthingRunnable mSyncthingRunnable;
|
private SyncthingRunnable mSyncthingRunnable;
|
||||||
|
|
||||||
|
@ -191,7 +191,7 @@ public class SyncthingService extends Service {
|
||||||
mStopScheduled = true;
|
mStopScheduled = true;
|
||||||
} else if (mApi != null) {
|
} else if (mApi != null) {
|
||||||
mApi.shutdown();
|
mApi.shutdown();
|
||||||
for (RepoObserver ro : mObservers) {
|
for (FolderObserver ro : mObservers) {
|
||||||
ro.stopWatching();
|
ro.stopWatching();
|
||||||
}
|
}
|
||||||
mObservers.clear();
|
mObservers.clear();
|
||||||
|
@ -256,7 +256,7 @@ public class SyncthingService extends Service {
|
||||||
if (isFirstStart()) {
|
if (isFirstStart()) {
|
||||||
Log.i(TAG, "App started for the first time. " +
|
Log.i(TAG, "App started for the first time. " +
|
||||||
"Copying default config, keys will be generated automatically");
|
"Copying default config, keys will be generated automatically");
|
||||||
mConfig.createCameraRepo();
|
mConfig.createCameraFolder();
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Pair<>(mConfig.getWebGuiUrl(), mConfig.getApiKey());
|
return new Pair<>(mConfig.getWebGuiUrl(), mConfig.getApiKey());
|
||||||
|
@ -269,8 +269,8 @@ public class SyncthingService extends Service {
|
||||||
@Override
|
@Override
|
||||||
public void onApiAvailable() {
|
public void onApiAvailable() {
|
||||||
onApiChange();
|
onApiChange();
|
||||||
for (RestApi.Repo r : mApi.getRepos()) {
|
for (RestApi.Folder r : mApi.getFolders()) {
|
||||||
mObservers.add(new RepoObserver(mApi, r));
|
mObservers.add(new FolderObserver(mApi, r));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -75,7 +75,7 @@ public class ConfigXml {
|
||||||
* Coming from 0.2.0 and earlier, globalAnnounceServer value "announce.syncthing.net:22025" is
|
* Coming from 0.2.0 and earlier, globalAnnounceServer value "announce.syncthing.net:22025" is
|
||||||
* replaced with "194.126.249.5:22025" (as domain resolve is broken).
|
* replaced with "194.126.249.5:22025" (as domain resolve is broken).
|
||||||
* <p/>
|
* <p/>
|
||||||
* Coming from 0.3.0 and earlier, the ignorePerms flag is set to true on every repository.
|
* Coming from 0.3.0 and earlier, the ignorePerms flag is set to true on every folder.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("SdCardPath")
|
@SuppressWarnings("SdCardPath")
|
||||||
public void updateIfNeeded() {
|
public void updateIfNeeded() {
|
||||||
|
@ -110,18 +110,18 @@ public class ConfigXml {
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
NodeList repos = mConfig.getDocumentElement().getElementsByTagName("repository");
|
NodeList folders = mConfig.getDocumentElement().getElementsByTagName("folder");
|
||||||
for (int i = 0; i < repos.getLength(); i++) {
|
for (int i = 0; i < folders.getLength(); i++) {
|
||||||
Element r = (Element) repos.item(i);
|
Element r = (Element) folders.item(i);
|
||||||
// Set ignorePerms attribute.
|
// Set ignorePerms attribute.
|
||||||
if (!r.hasAttribute("ignorePerms") ||
|
if (!r.hasAttribute("ignorePerms") ||
|
||||||
!Boolean.parseBoolean(r.getAttribute("ignorePerms"))) {
|
!Boolean.parseBoolean(r.getAttribute("ignorePerms"))) {
|
||||||
Log.i(TAG, "Set 'ignorePerms' on repository " + r.getAttribute("id"));
|
Log.i(TAG, "Set 'ignorePerms' on folder " + r.getAttribute("id"));
|
||||||
r.setAttribute("ignorePerms", Boolean.toString(true));
|
r.setAttribute("ignorePerms", Boolean.toString(true));
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Replace /sdcard/ in repository path with proper path.
|
// Replace /sdcard/ in folder path with proper path.
|
||||||
String dir = r.getAttribute("directory");
|
String dir = r.getAttribute("directory");
|
||||||
if (dir.startsWith("/sdcard")) {
|
if (dir.startsWith("/sdcard")) {
|
||||||
String newDir = dir.replace("/sdcard",
|
String newDir = dir.replace("/sdcard",
|
||||||
|
@ -149,18 +149,16 @@ public class ConfigXml {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a repository for the default camera folder.
|
* Creates a folder for the default camera folder.
|
||||||
*/
|
*/
|
||||||
public void createCameraRepo() {
|
public void createCameraFolder() {
|
||||||
File cameraFolder =
|
Element cameraFolder = mConfig.createElement("folder");
|
||||||
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM);
|
cameraFolder.setAttribute("id", "camera");
|
||||||
|
cameraFolder.setAttribute("directory", Environment
|
||||||
Element cameraRepo = mConfig.createElement("repository");
|
.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).getAbsolutePath());
|
||||||
cameraRepo.setAttribute("id", "camera");
|
cameraFolder.setAttribute("ro", "true");
|
||||||
cameraRepo.setAttribute("directory", cameraFolder.getAbsolutePath());
|
cameraFolder.setAttribute("ignorePerms", "true");
|
||||||
cameraRepo.setAttribute("ro", "true");
|
mConfig.getDocumentElement().appendChild(cameraFolder);
|
||||||
cameraRepo.setAttribute("ignorePerms", "true");
|
|
||||||
mConfig.getDocumentElement().appendChild(cameraRepo);
|
|
||||||
|
|
||||||
saveChanges();
|
saveChanges();
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,16 +17,16 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates item views for node items.
|
* Generates item views for device items.
|
||||||
*/
|
*/
|
||||||
public class NodesAdapter extends ArrayAdapter<RestApi.Node>
|
public class DevicesAdapter extends ArrayAdapter<RestApi.Device>
|
||||||
implements RestApi.OnReceiveConnectionsListener {
|
implements RestApi.OnReceiveConnectionsListener {
|
||||||
|
|
||||||
private Map<String, RestApi.Connection> mConnections =
|
private Map<String, RestApi.Connection> mConnections =
|
||||||
new HashMap<>();
|
new HashMap<>();
|
||||||
|
|
||||||
public NodesAdapter(Context context) {
|
public DevicesAdapter(Context context) {
|
||||||
super(context, R.layout.node_list_item);
|
super(context, R.layout.device_list_item);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -34,7 +34,7 @@ public class NodesAdapter extends ArrayAdapter<RestApi.Node>
|
||||||
if (convertView == null) {
|
if (convertView == null) {
|
||||||
LayoutInflater inflater = (LayoutInflater) getContext()
|
LayoutInflater inflater = (LayoutInflater) getContext()
|
||||||
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||||
convertView = inflater.inflate(R.layout.node_list_item, parent, false);
|
convertView = inflater.inflate(R.layout.device_list_item, parent, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
TextView name = (TextView) convertView.findViewById(R.id.name);
|
TextView name = (TextView) convertView.findViewById(R.id.name);
|
||||||
|
@ -42,18 +42,18 @@ public class NodesAdapter extends ArrayAdapter<RestApi.Node>
|
||||||
TextView download = (TextView) convertView.findViewById(R.id.download);
|
TextView download = (TextView) convertView.findViewById(R.id.download);
|
||||||
TextView upload = (TextView) convertView.findViewById(R.id.upload);
|
TextView upload = (TextView) convertView.findViewById(R.id.upload);
|
||||||
|
|
||||||
String nodeId = getItem(position).NodeID;
|
String deviceId = getItem(position).DeviceID;
|
||||||
RestApi.Connection conn = mConnections.get(nodeId);
|
RestApi.Connection conn = mConnections.get(deviceId);
|
||||||
|
|
||||||
name.setText(getItem(position).Name);
|
name.setText(getItem(position).Name);
|
||||||
Resources r = getContext().getResources();
|
Resources r = getContext().getResources();
|
||||||
if (conn != null) {
|
if (conn != null) {
|
||||||
if (conn.Completion == 100) {
|
if (conn.Completion == 100) {
|
||||||
status.setText(r.getString(R.string.node_up_to_date));
|
status.setText(r.getString(R.string.device_up_to_date));
|
||||||
status.setTextColor(r.getColor(R.color.text_green));
|
status.setTextColor(r.getColor(R.color.text_green));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
status.setText(r.getString(R.string.node_syncing, conn.Completion));
|
status.setText(r.getString(R.string.device_syncing, conn.Completion));
|
||||||
status.setTextColor(r.getColor(R.color.text_blue));
|
status.setTextColor(r.getColor(R.color.text_blue));
|
||||||
}
|
}
|
||||||
download.setText(RestApi.readableTransferRate(getContext(), conn.InBits));
|
download.setText(RestApi.readableTransferRate(getContext(), conn.InBits));
|
||||||
|
@ -62,7 +62,7 @@ public class NodesAdapter extends ArrayAdapter<RestApi.Node>
|
||||||
else {
|
else {
|
||||||
download.setText("0 " + r.getStringArray(R.array.transfer_rate_units)[0]);
|
download.setText("0 " + r.getStringArray(R.array.transfer_rate_units)[0]);
|
||||||
upload.setText("0 " + r.getStringArray(R.array.transfer_rate_units)[0]);
|
upload.setText("0 " + r.getStringArray(R.array.transfer_rate_units)[0]);
|
||||||
status.setText(r.getString(R.string.node_disconnected));
|
status.setText(r.getString(R.string.device_disconnected));
|
||||||
status.setTextColor(r.getColor(R.color.text_red));
|
status.setTextColor(r.getColor(R.color.text_red));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,14 +72,14 @@ public class NodesAdapter extends ArrayAdapter<RestApi.Node>
|
||||||
/**
|
/**
|
||||||
* Replacement for addAll, which is not implemented on lower API levels.
|
* Replacement for addAll, which is not implemented on lower API levels.
|
||||||
*/
|
*/
|
||||||
public void add(List<RestApi.Node> nodes) {
|
public void add(List<RestApi.Device> devices) {
|
||||||
for (RestApi.Node n : nodes) {
|
for (RestApi.Device n : devices) {
|
||||||
add(n);
|
add(n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Requests new connection info for all nodes visible in listView.
|
* Requests new connection info for all devices visible in listView.
|
||||||
*/
|
*/
|
||||||
public void updateConnections(RestApi api, ListView listView) {
|
public void updateConnections(RestApi api, ListView listView) {
|
||||||
for (int i = 0; i < getCount(); i++) {
|
for (int i = 0; i < getCount(); i++) {
|
|
@ -12,44 +12,44 @@ import java.util.ArrayList;
|
||||||
/**
|
/**
|
||||||
* Recursively watches a directory and all subfolders.
|
* Recursively watches a directory and all subfolders.
|
||||||
*/
|
*/
|
||||||
public class RepoObserver extends FileObserver {
|
public class FolderObserver extends FileObserver {
|
||||||
|
|
||||||
private static final String TAG = "RepoObserver";
|
private static final String TAG = "FolderObserver";
|
||||||
|
|
||||||
private final OnRepoFileChangeListener mListener;
|
private final OnFolderFileChangeListener mListener;
|
||||||
|
|
||||||
private final RestApi.Repo mRepo;
|
private final RestApi.Folder mFolder;
|
||||||
|
|
||||||
private final String mPath;
|
private final String mPath;
|
||||||
|
|
||||||
private final ArrayList<RepoObserver> mChilds;
|
private final ArrayList<FolderObserver> mChilds;
|
||||||
|
|
||||||
public interface OnRepoFileChangeListener {
|
public interface OnFolderFileChangeListener {
|
||||||
public void onRepoFileChange(String repoId, String relativePath);
|
public void onFolderFileChange(String folderId, String relativePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
public RepoObserver(OnRepoFileChangeListener listener, RestApi.Repo repo) {
|
public FolderObserver(OnFolderFileChangeListener listener, RestApi.Folder folder) {
|
||||||
this(listener, repo, "");
|
this(listener, folder, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs watcher and starts watching the given directory recursively.
|
* Constructs watcher and starts watching the given directory recursively.
|
||||||
*
|
*
|
||||||
* @param listener The listener where changes should be sent to.
|
* @param listener The listener where changes should be sent to.
|
||||||
* @param repo The repository where this folder belongs to.
|
* @param folder The folder where this folder belongs to.
|
||||||
* @param path Path to the monitored folder, relative to repo root.
|
* @param path Path to the monitored folder, relative to folder root.
|
||||||
*/
|
*/
|
||||||
private RepoObserver(OnRepoFileChangeListener listener, RestApi.Repo repo, String path) {
|
private FolderObserver(OnFolderFileChangeListener listener, RestApi.Folder folder, String path) {
|
||||||
super(repo.Directory + "/" + path,
|
super(folder.Path + "/" + path,
|
||||||
ATTRIB | CLOSE_WRITE | CREATE | DELETE | DELETE_SELF | MODIFY | MOVED_FROM |
|
ATTRIB | CLOSE_WRITE | CREATE | DELETE | DELETE_SELF | MODIFY | MOVED_FROM |
|
||||||
MOVED_TO | MOVE_SELF);
|
MOVED_TO | MOVE_SELF);
|
||||||
mListener = listener;
|
mListener = listener;
|
||||||
mRepo = repo;
|
mFolder = folder;
|
||||||
mPath = path;
|
mPath = path;
|
||||||
Log.v(TAG, "observer created for " + path + " in " + repo.ID);
|
Log.v(TAG, "observer created for " + path + " in " + folder.ID);
|
||||||
startWatching();
|
startWatching();
|
||||||
|
|
||||||
File[] directories = new File(repo.Directory, path).listFiles(new FilenameFilter() {
|
File[] directories = new File(folder.Path, path).listFiles(new FilenameFilter() {
|
||||||
@Override
|
@Override
|
||||||
public boolean accept(File current, String name) {
|
public boolean accept(File current, String name) {
|
||||||
return new File(current, name).isDirectory();
|
return new File(current, name).isDirectory();
|
||||||
|
@ -58,7 +58,7 @@ public class RepoObserver extends FileObserver {
|
||||||
|
|
||||||
mChilds = new ArrayList<>();
|
mChilds = new ArrayList<>();
|
||||||
for (File f : directories) {
|
for (File f : directories) {
|
||||||
mChilds.add(new RepoObserver(mListener, mRepo, path + "/" + f.getName()));
|
mChilds.add(new FolderObserver(mListener, mFolder, path + "/" + f.getName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ public class RepoObserver extends FileObserver {
|
||||||
case DELETE_SELF:
|
case DELETE_SELF:
|
||||||
// fall through
|
// fall through
|
||||||
case DELETE:
|
case DELETE:
|
||||||
for (RepoObserver ro : mChilds) {
|
for (FolderObserver ro : mChilds) {
|
||||||
if (ro.mPath.equals(path)) {
|
if (ro.mPath.equals(path)) {
|
||||||
mChilds.remove(ro);
|
mChilds.remove(ro);
|
||||||
break;
|
break;
|
||||||
|
@ -88,10 +88,10 @@ public class RepoObserver extends FileObserver {
|
||||||
case MOVED_TO:
|
case MOVED_TO:
|
||||||
// fall through
|
// fall through
|
||||||
case CREATE:
|
case CREATE:
|
||||||
mChilds.add(new RepoObserver(mListener, mRepo, path));
|
mChilds.add(new FolderObserver(mListener, mFolder, path));
|
||||||
// fall through
|
// fall through
|
||||||
default:
|
default:
|
||||||
mListener.onRepoFileChange(mRepo.ID, new File(mPath, path).getPath());
|
mListener.onFolderFileChange(mFolder.ID, new File(mPath, path).getPath());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ public class RepoObserver extends FileObserver {
|
||||||
@Override
|
@Override
|
||||||
public void stopWatching() {
|
public void stopWatching() {
|
||||||
super.stopWatching();
|
super.stopWatching();
|
||||||
for (RepoObserver ro : mChilds) {
|
for (FolderObserver ro : mChilds) {
|
||||||
ro.stopWatching();
|
ro.stopWatching();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -15,15 +15,15 @@ import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates item views for repository items.
|
* Generates item views for folder items.
|
||||||
*/
|
*/
|
||||||
public class ReposAdapter extends ArrayAdapter<RestApi.Repo>
|
public class FoldersAdapter extends ArrayAdapter<RestApi.Folder>
|
||||||
implements RestApi.OnReceiveModelListener {
|
implements RestApi.OnReceiveModelListener {
|
||||||
|
|
||||||
private HashMap<String, RestApi.Model> mModels = new HashMap<>();
|
private HashMap<String, RestApi.Model> mModels = new HashMap<>();
|
||||||
|
|
||||||
public ReposAdapter(Context context) {
|
public FoldersAdapter(Context context) {
|
||||||
super(context, R.layout.repo_list_item);
|
super(context, R.layout.folder_list_item);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -31,7 +31,7 @@ public class ReposAdapter extends ArrayAdapter<RestApi.Repo>
|
||||||
if (convertView == null) {
|
if (convertView == null) {
|
||||||
LayoutInflater inflater = (LayoutInflater) getContext()
|
LayoutInflater inflater = (LayoutInflater) getContext()
|
||||||
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||||
convertView = inflater.inflate(R.layout.repo_list_item, parent, false);
|
convertView = inflater.inflate(R.layout.folder_list_item, parent, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
TextView id = (TextView) convertView.findViewById(R.id.id);
|
TextView id = (TextView) convertView.findViewById(R.id.id);
|
||||||
|
@ -41,13 +41,13 @@ public class ReposAdapter extends ArrayAdapter<RestApi.Repo>
|
||||||
TextView size = (TextView) convertView.findViewById(R.id.size);
|
TextView size = (TextView) convertView.findViewById(R.id.size);
|
||||||
TextView invalid = (TextView) convertView.findViewById(R.id.invalid);
|
TextView invalid = (TextView) convertView.findViewById(R.id.invalid);
|
||||||
|
|
||||||
RestApi.Repo repo = getItem(position);
|
RestApi.Folder folder = getItem(position);
|
||||||
RestApi.Model model = mModels.get(repo.ID);
|
RestApi.Model model = mModels.get(folder.ID);
|
||||||
id.setText(repo.ID);
|
id.setText(folder.ID);
|
||||||
state.setTextColor(getContext().getResources().getColor(R.color.text_green));
|
state.setTextColor(getContext().getResources().getColor(R.color.text_green));
|
||||||
directory.setText((repo.Directory));
|
directory.setText((folder.Path));
|
||||||
if (model != null) {
|
if (model != null) {
|
||||||
state.setText(getContext().getString(R.string.repo_progress_format, model.state,
|
state.setText(getContext().getString(R.string.folder_progress_format, model.state,
|
||||||
(model.globalBytes <= 0)
|
(model.globalBytes <= 0)
|
||||||
? 100
|
? 100
|
||||||
: (int) ((model.localBytes / (float) model.globalBytes) * 100)
|
: (int) ((model.localBytes / (float) model.globalBytes) * 100)
|
||||||
|
@ -56,13 +56,13 @@ public class ReposAdapter extends ArrayAdapter<RestApi.Repo>
|
||||||
.getString(R.string.files, model.localFiles, model.globalFiles));
|
.getString(R.string.files, model.localFiles, model.globalFiles));
|
||||||
size.setText(RestApi.readableFileSize(getContext(), model.localBytes) + " / " +
|
size.setText(RestApi.readableFileSize(getContext(), model.localBytes) + " / " +
|
||||||
RestApi.readableFileSize(getContext(), model.globalBytes));
|
RestApi.readableFileSize(getContext(), model.globalBytes));
|
||||||
if (repo.Invalid.equals("")) {
|
if (folder.Invalid.equals("")) {
|
||||||
invalid.setText(model.invalid);
|
invalid.setText(model.invalid);
|
||||||
invalid.setVisibility((model.invalid.equals("")) ? View.GONE : View.VISIBLE);
|
invalid.setVisibility((model.invalid.equals("")) ? View.GONE : View.VISIBLE);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
invalid.setText(repo.Invalid);
|
invalid.setText(folder.Invalid);
|
||||||
invalid.setVisibility((repo.Invalid.equals("")) ? View.GONE : View.VISIBLE);
|
invalid.setVisibility((folder.Invalid.equals("")) ? View.GONE : View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
return convertView;
|
return convertView;
|
||||||
|
@ -71,8 +71,8 @@ public class ReposAdapter extends ArrayAdapter<RestApi.Repo>
|
||||||
/**
|
/**
|
||||||
* Replacement for addAll, which is not implemented on lower API levels.
|
* Replacement for addAll, which is not implemented on lower API levels.
|
||||||
*/
|
*/
|
||||||
public void add(List<RestApi.Repo> nodes) {
|
public void add(List<RestApi.Folder> devices) {
|
||||||
for (RestApi.Repo r : nodes) {
|
for (RestApi.Folder r : devices) {
|
||||||
add(r);
|
add(r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -90,8 +90,8 @@ public class ReposAdapter extends ArrayAdapter<RestApi.Repo>
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onReceiveModel(String repoId, RestApi.Model model) {
|
public void onReceiveModel(String folderId, RestApi.Model model) {
|
||||||
mModels.put(repoId, model);
|
mModels.put(folderId, model);
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,16 +11,16 @@
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/node_id_title"
|
android:id="@+id/device_id_title"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/node_id"
|
android:id="@+id/device_id"
|
||||||
android:lines="1"
|
android:lines="1"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:layout_below="@id/node_id_title"
|
android:layout_below="@id/device_id_title"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
|
@ -9,15 +9,15 @@
|
||||||
app:showAsAction="always" />
|
app:showAsAction="always" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/share_node_id"
|
android:id="@+id/share_device_id"
|
||||||
android:icon="@android:drawable/ic_menu_share"
|
android:icon="@android:drawable/ic_menu_share"
|
||||||
android:title="@string/share_node_id"
|
android:title="@string/share_device_id"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="ifRoom" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/delete"
|
android:id="@+id/delete"
|
||||||
android:icon="@drawable/ic_delete"
|
android:icon="@drawable/ic_delete"
|
||||||
android:title="@string/delete_node"
|
android:title="@string/delete_device"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="ifRoom" />
|
||||||
|
|
||||||
</menu>
|
</menu>
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/create_folder"
|
android:id="@+id/create_folder"
|
||||||
android:title="@string/create_folder"
|
android:title="@string/create_fs_folder"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="ifRoom" />
|
||||||
|
|
||||||
</menu>
|
</menu>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<item
|
<item
|
||||||
android:id="@+id/delete"
|
android:id="@+id/delete"
|
||||||
android:icon="@drawable/ic_delete"
|
android:icon="@drawable/ic_delete"
|
||||||
android:title="@string/delete_repo"
|
android:title="@string/delete_folder"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="ifRoom" />
|
||||||
|
|
||||||
</menu>
|
</menu>
|
|
@ -4,19 +4,19 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/share_node_id"
|
android:id="@+id/share_device_id"
|
||||||
android:icon="@android:drawable/ic_menu_share"
|
android:icon="@android:drawable/ic_menu_share"
|
||||||
android:title="@string/share_node_id"
|
android:title="@string/share_device_id"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="ifRoom" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/add_repo"
|
android:id="@+id/add_folder"
|
||||||
android:title="@string/add_repo"
|
android:title="@string/add_folder"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="ifRoom" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/add_node"
|
android:id="@+id/add_device"
|
||||||
android:title="@string/add_node"
|
android:title="@string/add_device"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="ifRoom" />
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,37 +3,37 @@
|
||||||
<string name="app_name">Syncthing</string>
|
<string name="app_name">Syncthing</string>
|
||||||
<string name="app_description">Nahraďte proprietární služby něčím otevřeným, důvěryhodným a decentralizovaným.</string>
|
<string name="app_description">Nahraďte proprietární služby něčím otevřeným, důvěryhodným a decentralizovaným.</string>
|
||||||
<!--MainActivity-->
|
<!--MainActivity-->
|
||||||
<!--Title of the "add repo" menu action-->
|
<!--Title of the "add folder" menu action-->
|
||||||
<string name="add_repo">Přidat repozitář</string>
|
<string name="add_folder">Přidat repozitář</string>
|
||||||
<!--Title of the "share node id" menu action-->
|
<!--Title of the "share device id" menu action-->
|
||||||
<string name="share_node_id">Sdílet ID uzlu</string>
|
<string name="share_device_id">Sdílet ID uzlu</string>
|
||||||
<!--Shown in the chooser dialog when sharing a Node ID-->
|
<!--Shown in the chooser dialog when sharing a Device ID-->
|
||||||
<string name="send_node_id_to">Poslat ID uzlu na</string>
|
<string name="send_device_id_to">Poslat ID uzlu na</string>
|
||||||
<!--Text for RepositoriesFragment and NodesFragment loading view-->
|
<!--Text for FolderFragment and DevicesFragment loading view-->
|
||||||
<string name="api_loading">Čekání na API</string>
|
<string name="api_loading">Čekání na API</string>
|
||||||
<!--RepositoriesFragment-->
|
<!--FolderFragment-->
|
||||||
<string name="repositories_fragment_title">Repozitáře</string>
|
<string name="folder_fragment_title">Folderzitáře</string>
|
||||||
<!--Format string for repository progress. First parameter is status string, second is sync percentage-->
|
<!--Format string for folder progress. First parameter is status string, second is sync percentage-->
|
||||||
<string name="repo_progress_format">%1$s (%2$d%%)</string>
|
<string name="folder_progress_format">%1$s (%2$d%%)</string>
|
||||||
<!--Shown if no repos exist-->
|
<!--Shown if no folders exist-->
|
||||||
<string name="repositories_list_empty">Repozitáře nenalezeny</string>
|
<string name="folder_list_empty">Folderzitáře nenalezeny</string>
|
||||||
<!--Format string for repository file count-->
|
<!--Format string for folder file count-->
|
||||||
<string name="files">%1$d / %2$d souborů</string>
|
<string name="files">%1$d / %2$d souborů</string>
|
||||||
<!--NodesFragment-->
|
<!--DevicesFragment-->
|
||||||
<string name="nodes_fragment_title">Uzly</string>
|
<string name="devices_fragment_title">Uzly</string>
|
||||||
<!--Shown if no nodes exist-->
|
<!--Shown if no devices exist-->
|
||||||
<string name="nodes_list_empty">Uzly nenalezeny</string>
|
<string name="devices_list_empty">Uzly nenalezeny</string>
|
||||||
<!--Indicates that a repo is fully synced to the local node-->
|
<!--Indicates that a folder is fully synced to the local device-->
|
||||||
<string name="node_up_to_date">Aktuální</string>
|
<string name="device_up_to_date">Aktuální</string>
|
||||||
<!--Indicates that the node is currently syncing. Parameter is sync percentage-->
|
<!--Indicates that the device is currently syncing. Parameter is sync percentage-->
|
||||||
<string name="node_syncing">Synchronizuji (%1$d%%)</string>
|
<string name="device_syncing">Synchronizuji (%1$d%%)</string>
|
||||||
<!--Indicates that there is no connection to the node-->
|
<!--Indicates that there is no connection to the device-->
|
||||||
<string name="node_disconnected">Odpojeno</string>
|
<string name="device_disconnected">Odpojeno</string>
|
||||||
<!--Title for current download rate-->
|
<!--Title for current download rate-->
|
||||||
<string name="download_title">Download</string>
|
<string name="download_title">Download</string>
|
||||||
<!--Title for current upload rate-->
|
<!--Title for current upload rate-->
|
||||||
<string name="upload_title">Upload</string>
|
<string name="upload_title">Upload</string>
|
||||||
<!--LocalNodeInfoFragment-->
|
<!--LocalDeviceInfoFragment-->
|
||||||
<!--ActionBar title shown when the drawer is open-->
|
<!--ActionBar title shown when the drawer is open-->
|
||||||
<string name="system_info">Systémové informace</string>
|
<string name="system_info">Systémové informace</string>
|
||||||
<!--Same as download_title with a colon and space appended-->
|
<!--Same as download_title with a colon and space appended-->
|
||||||
|
@ -46,40 +46,40 @@
|
||||||
<string name="ram_usage">Využití RAM</string>
|
<string name="ram_usage">Využití RAM</string>
|
||||||
<!--Title for announce server status-->
|
<!--Title for announce server status-->
|
||||||
<string name="announce_server">Ohlašovací Server</string>
|
<string name="announce_server">Ohlašovací Server</string>
|
||||||
<!--RepoSettingsFragment-->
|
<!--FolderSettingsFragment-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="repo_id">ID repozitáře</string>
|
<string name="folder_id">ID repozitáře</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="directory">Adresář</string>
|
<string name="directory">Adresář</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="rescan_interval">Interval opakování skenu</string>
|
<string name="rescan_interval">Interval opakování skenu</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="repo_master">Hlavní repozitář</string>
|
<string name="folder_master">Hlavní repozitář</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="nodes">Uzly</string>
|
<string name="devices">Uzly</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="file_versioning">Verze souborů</string>
|
<string name="file_versioning">Verze souborů</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="keep_versions">Udržovat verze</string>
|
<string name="keep_versions">Udržovat verze</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="delete_repo">Smazat repozitář</string>
|
<string name="delete_folder">Smazat repozitář</string>
|
||||||
<!--Title for RepoSettingsFragment in create mode-->
|
<!--Title for FolderSettingsFragment in create mode-->
|
||||||
<string name="create_repo">Vytvořit repozitář</string>
|
<string name="create_folder">Vytvořit repozitář</string>
|
||||||
<!--Title for RepoSettingsFragment in edit mode-->
|
<!--Title for FolderSettingsFragment in edit mode-->
|
||||||
<string name="edit_repo">Upravit repozitář</string>
|
<string name="edit_folder">Upravit repozitář</string>
|
||||||
<!--Menu item to confirm repo creation-->
|
<!--Menu item to confirm folder creation-->
|
||||||
<string name="create">Vytvořit</string>
|
<string name="create">Vytvořit</string>
|
||||||
<!--Dialog shown when attempting to delete a repository-->
|
<!--Dialog shown when attempting to delete a folder-->
|
||||||
<string name="delete_repo_confirm">Opravdu chcete smazat tento repozitář?</string>
|
<string name="delete_folder_confirm">Opravdu chcete smazat tento repozitář?</string>
|
||||||
<!--Toast shown when trying to create a repository with an empty ID-->
|
<!--Toast shown when trying to create a folder with an empty ID-->
|
||||||
<string name="repo_id_required">ID repozitáře nesmí být prázdné</string>
|
<string name="folder_id_required">ID repozitáře nesmí být prázdné</string>
|
||||||
<!--Toast shown when trying to create a repository with an empty path-->
|
<!--Toast shown when trying to create a folder with an empty path-->
|
||||||
<string name="repo_path_required">Cesta k repozitáři nesmí být prázdná</string>
|
<string name="folder_path_required">Cesta k repozitáři nesmí být prázdná</string>
|
||||||
<!--Toast shown when selecting 'nodes' if no nodes have been added-->
|
<!--Toast shown when selecting 'devices' if no nodes have been added-->
|
||||||
<string name="no_nodes">Nejdříve prosím připojte uzel.</string>
|
<string name="no_devices">Nejdříve prosím připojte uzel.</string>
|
||||||
<!--NodeSettingsFragment-->
|
<!--DeviceSettingsFragment-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="node_id">ID uzlu</string>
|
<string name="device_id">ID uzlu</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="name">Jméno</string>
|
<string name="name">Jméno</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
|
@ -89,20 +89,20 @@
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="compression">Komprese</string>
|
<string name="compression">Komprese</string>
|
||||||
<!--ActionBar item-->
|
<!--ActionBar item-->
|
||||||
<string name="delete_node">Smazat uzel</string>
|
<string name="delete_device">Smazat uzel</string>
|
||||||
<!--Title for NodeSettingsFragment in create mode-->
|
<!--Title for DeviceSettingsFragment in create mode-->
|
||||||
<string name="add_node">Přidat uzel</string>
|
<string name="add_device">Přidat uzel</string>
|
||||||
<!--Menu item to confirm adding a node-->
|
<!--Menu item to confirm adding a device-->
|
||||||
<string name="add">Přidat</string>
|
<string name="add">Přidat</string>
|
||||||
<!--Title for NodeSettingsFragment in edit mode-->
|
<!--Title for DeviceSettingsFragment in edit mode-->
|
||||||
<string name="edit_node">Upravit uzel</string>
|
<string name="edit_device">Upravit uzel</string>
|
||||||
<!--Dialog shown when attempting to delete a node-->
|
<!--Dialog shown when attempting to delete a device-->
|
||||||
<string name="delete_node_confirm">Opravdu chcete smazat tento uzel?</string>
|
<string name="delete_device_confirm">Opravdu chcete smazat tento uzel?</string>
|
||||||
<!--Toast shown when trying to create a node with an empty ID-->
|
<!--Toast shown when trying to create a device with an empty ID-->
|
||||||
<string name="node_id_required">ID uzlu nesmí být prázdné</string>
|
<string name="device_id_required">ID uzlu nesmí být prázdné</string>
|
||||||
<!--Toast shown when trying to create a node with an empty name-->
|
<!--Toast shown when trying to create a device with an empty name-->
|
||||||
<string name="node_name_required">Jméno uzlu nesmí být prázdné</string>
|
<string name="device_name_required">Jméno uzlu nesmí být prázdné</string>
|
||||||
<!--Content description for node ID qr code icon-->
|
<!--Content description for device ID qr code icon-->
|
||||||
<string name="scan_qr_code_description">Načíst QR kód</string>
|
<string name="scan_qr_code_description">Načíst QR kód</string>
|
||||||
<!--Text for toast shown if the "scan QR code" intent fails with an ActivityNotFoundException-->
|
<!--Text for toast shown if the "scan QR code" intent fails with an ActivityNotFoundException-->
|
||||||
<string name="no_qr_scanner_installed">Není nainstalována žádná QR čtečka, nebo není podporována. \
|
<string name="no_qr_scanner_installed">Není nainstalována žádná QR čtečka, nebo není podporována. \
|
||||||
|
@ -134,9 +134,9 @@ Hlašte prosím jakékoliv problémy na které narazíte přes Github.</string>
|
||||||
<!--Title for the preference to set STTRACE parameters-->
|
<!--Title for the preference to set STTRACE parameters-->
|
||||||
<string name="sttrace_title">Možnosti ladění</string>
|
<string name="sttrace_title">Možnosti ladění</string>
|
||||||
<!--Settings item that opens issue tracker-->
|
<!--Settings item that opens issue tracker-->
|
||||||
<string name="report_issue_title">Nahlásit chybu</string>
|
<string name="folderrt_issue_title">Nahlásit chybu</string>
|
||||||
<!--Summary for the issue tracker settings item-->
|
<!--Summary for the issue tracker settings item-->
|
||||||
<string name="report_issue_summary">Otevřít hlášení chyb pro Syncthing-Android</string>
|
<string name="folderrt_issue_summary">Otevřít hlášení chyb pro Syncthing-Android</string>
|
||||||
<!--URL of the issue tracker-->
|
<!--URL of the issue tracker-->
|
||||||
<!--Title of the preference showing upstream version name-->
|
<!--Title of the preference showing upstream version name-->
|
||||||
<string name="syncthing_version_title">Syncthing verze</string>
|
<string name="syncthing_version_title">Syncthing verze</string>
|
||||||
|
@ -146,7 +146,7 @@ Hlašte prosím jakékoliv problémy na které narazíte přes Github.</string>
|
||||||
<!--ListView empty text-->
|
<!--ListView empty text-->
|
||||||
<string name="directory_empty">Adresář je prázdný</string>
|
<string name="directory_empty">Adresář je prázdný</string>
|
||||||
<!--Menu item to create folder-->
|
<!--Menu item to create folder-->
|
||||||
<string name="create_folder">Vytvořit nový adresář</string>
|
<string name="create_fs_create_folfolder">Vytvořit nový adresář</string>
|
||||||
<!--Menu item to select the current folder-->
|
<!--Menu item to select the current folder-->
|
||||||
<string name="select_folder">Vybrat adresář</string>
|
<string name="select_folder">Vybrat adresář</string>
|
||||||
<!--SyncthingService-->
|
<!--SyncthingService-->
|
||||||
|
@ -170,8 +170,8 @@ Pokud se toto bude opakovat, zkuste restartovat svůj přístroj.</string>
|
||||||
<string name="restart_notification_text">Kliknout zde pro restartování aplikace syncthing</string>
|
<string name="restart_notification_text">Kliknout zde pro restartování aplikace syncthing</string>
|
||||||
<!--Text for the dismiss button of the restart Activity-->
|
<!--Text for the dismiss button of the restart Activity-->
|
||||||
<string name="restart_later">Restartovat později</string>
|
<string name="restart_later">Restartovat později</string>
|
||||||
<!--Shown when a node ID is copied to the clipboard-->
|
<!--Shown when a device ID is copied to the clipboard-->
|
||||||
<string name="node_id_copied_to_clipboard">ID uzlu bylo zkopírováno schránky</string>
|
<string name="device_id_copied_to_clipboard">ID uzlu bylo zkopírováno schránky</string>
|
||||||
<!--Strings representing units for file sizes, from smallest to largest-->
|
<!--Strings representing units for file sizes, from smallest to largest-->
|
||||||
<string-array name="file_size_units">
|
<string-array name="file_size_units">
|
||||||
<item>B</item>
|
<item>B</item>
|
||||||
|
|
|
@ -3,37 +3,37 @@
|
||||||
<string name="app_name">Syncthing</string>
|
<string name="app_name">Syncthing</string>
|
||||||
<string name="app_description">Ersetzt proprietäre Angebote durch etwas quelloffenes, vertrauswürdiges und dezentraliserites.</string>
|
<string name="app_description">Ersetzt proprietäre Angebote durch etwas quelloffenes, vertrauswürdiges und dezentraliserites.</string>
|
||||||
<!--MainActivity-->
|
<!--MainActivity-->
|
||||||
<!--Title of the "add repo" menu action-->
|
<!--Title of the "add folder" menu action-->
|
||||||
<string name="add_repo">Verzeichnis hinzufügen</string>
|
<string name="add_folder">Verzeichnis hinzufügen</string>
|
||||||
<!--Title of the "share node id" menu action-->
|
<!--Title of the "share device id" menu action-->
|
||||||
<string name="share_node_id">Knoten ID teilen</string>
|
<string name="share_device_id">Knoten ID teilen</string>
|
||||||
<!--Shown in the chooser dialog when sharing a Node ID-->
|
<!--Shown in the chooser dialog when sharing a Device ID-->
|
||||||
<string name="send_node_id_to">Knoten ID senden an</string>
|
<string name="send_device_id_to">Knoten ID senden an</string>
|
||||||
<!--Text for RepositoriesFragment and NodesFragment loading view-->
|
<!--Text for FolderFragment and DevicesFragment loading view-->
|
||||||
<string name="api_loading">Warte auf Schnittstelle</string>
|
<string name="api_loading">Warte auf Schnittstelle</string>
|
||||||
<!--RepositoriesFragment-->
|
<!--FolderFragment-->
|
||||||
<string name="repositories_fragment_title">Verzeichnisse</string>
|
<string name="Folder_fragment_title">Verzeichnisse</string>
|
||||||
<!--Format string for repository progress. First parameter is status string, second is sync percentage-->
|
<!--Format string for folder progress. First parameter is status string, second is sync percentage-->
|
||||||
<string name="repo_progress_format">%1$s (%2$d%%)</string>
|
<string name="folder_progress_format">%1$s (%2$d%%)</string>
|
||||||
<!--Shown if no repos exist-->
|
<!--Shown if no folders exist-->
|
||||||
<string name="repositories_list_empty">Keine Verzeichnisse gefunden</string>
|
<string name="Folder_list_empty">Keine Verzeichnisse gefunden</string>
|
||||||
<!--Format string for repository file count-->
|
<!--Format string for folder file count-->
|
||||||
<string name="files">%1$d / %2$d Dateien</string>
|
<string name="files">%1$d / %2$d Dateien</string>
|
||||||
<!--NodesFragment-->
|
<!--DevicesFragment-->
|
||||||
<string name="nodes_fragment_title">Knoten</string>
|
<string name="devices_fragment_title">Knoten</string>
|
||||||
<!--Shown if no nodes exist-->
|
<!--Shown if no devices exist-->
|
||||||
<string name="nodes_list_empty">Keine Knoten gefunden</string>
|
<string name="devices_list_empty">Keine Knoten gefunden</string>
|
||||||
<!--Indicates that a repo is fully synced to the local node-->
|
<!--Indicates that a folder is fully synced to the local device-->
|
||||||
<string name="node_up_to_date">Aktuell</string>
|
<string name="device_up_to_date">Aktuell</string>
|
||||||
<!--Indicates that the node is currently syncing. Parameter is sync percentage-->
|
<!--Indicates that the device is currently syncing. Parameter is sync percentage-->
|
||||||
<string name="node_syncing">Synchronisiere (%1$d%%)</string>
|
<string name="device_syncing">Synchronisiere (%1$d%%)</string>
|
||||||
<!--Indicates that there is no connection to the node-->
|
<!--Indicates that there is no connection to the device-->
|
||||||
<string name="node_disconnected">Nicht verbunden</string>
|
<string name="device_disconnected">Nicht verbunden</string>
|
||||||
<!--Title for current download rate-->
|
<!--Title for current download rate-->
|
||||||
<string name="download_title">Download</string>
|
<string name="download_title">Download</string>
|
||||||
<!--Title for current upload rate-->
|
<!--Title for current upload rate-->
|
||||||
<string name="upload_title">Upload</string>
|
<string name="upload_title">Upload</string>
|
||||||
<!--LocalNodeInfoFragment-->
|
<!--LocalDeviceInfoFragment-->
|
||||||
<!--ActionBar title shown when the drawer is open-->
|
<!--ActionBar title shown when the drawer is open-->
|
||||||
<string name="system_info">System Informationen</string>
|
<string name="system_info">System Informationen</string>
|
||||||
<!--Same as download_title with a colon and space appended-->
|
<!--Same as download_title with a colon and space appended-->
|
||||||
|
@ -46,40 +46,40 @@
|
||||||
<string name="ram_usage">RAM Auslastung</string>
|
<string name="ram_usage">RAM Auslastung</string>
|
||||||
<!--Title for announce server status-->
|
<!--Title for announce server status-->
|
||||||
<string name="announce_server">Ankündigungs-Server</string>
|
<string name="announce_server">Ankündigungs-Server</string>
|
||||||
<!--RepoSettingsFragment-->
|
<!--FolderSettingsFragment-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="repo_id">Verzeichnis ID</string>
|
<string name="folder_id">Verzeichnis ID</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="directory">Ordner</string>
|
<string name="directory">Ordner</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="rescan_interval">Suchintervall</string>
|
<string name="rescan_interval">Suchintervall</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="repo_master">Originalverzeichnis</string>
|
<string name="folder_master">Originalverzeichnis</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="nodes">Knoten</string>
|
<string name="devices">Knoten</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="file_versioning">Dateiversionierung</string>
|
<string name="file_versioning">Dateiversionierung</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="keep_versions">Versionen behalten</string>
|
<string name="keep_versions">Versionen behalten</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="delete_repo">Verzeichnis löschen</string>
|
<string name="delete_folder">Verzeichnis löschen</string>
|
||||||
<!--Title for RepoSettingsFragment in create mode-->
|
<!--Title for FolderSettingsFragment in create mode-->
|
||||||
<string name="create_repo">Verzeichnis erstellen</string>
|
<string name="create_folder">Verzeichnis erstellen</string>
|
||||||
<!--Title for RepoSettingsFragment in edit mode-->
|
<!--Title for FolderSettingsFragment in edit mode-->
|
||||||
<string name="edit_repo">Verzeichnis bearbeiten</string>
|
<string name="edit_folder">Verzeichnis bearbeiten</string>
|
||||||
<!--Menu item to confirm repo creation-->
|
<!--Menu item to confirm folder creation-->
|
||||||
<string name="create">Erstellen</string>
|
<string name="create">Erstellen</string>
|
||||||
<!--Dialog shown when attempting to delete a repository-->
|
<!--Dialog shown when attempting to delete a folder-->
|
||||||
<string name="delete_repo_confirm">Soll dieses Verzeichnis wirklich gelöscht werden?</string>
|
<string name="delete_folder_confirm">Soll dieses Verzeichnis wirklich gelöscht werden?</string>
|
||||||
<!--Toast shown when trying to create a repository with an empty ID-->
|
<!--Toast shown when trying to create a folder with an empty ID-->
|
||||||
<string name="repo_id_required">Die Verzeichnis ID darf nicht leer sein</string>
|
<string name="folder_id_required">Die Verzeichnis ID darf nicht leer sein</string>
|
||||||
<!--Toast shown when trying to create a repository with an empty path-->
|
<!--Toast shown when trying to create a folder with an empty path-->
|
||||||
<string name="repo_path_required">Der Verzeichnispfad darf nicht leer sein</string>
|
<string name="folder_path_required">Der Verzeichnispfad darf nicht leer sein</string>
|
||||||
<!--Toast shown when selecting 'nodes' if no nodes have been added-->
|
<!--Toast shown when selecting 'devices' if no nodes have been added-->
|
||||||
<string name="no_nodes">Bitte verbinden Sie zuerst einen Knoten.</string>
|
<string name="no_devices">Bitte verbinden Sie zuerst einen Knoten.</string>
|
||||||
<!--NodeSettingsFragment-->
|
<!--DeviceSettingsFragment-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="node_id">Knoten ID</string>
|
<string name="device_id">Knoten ID</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="name">Name</string>
|
<string name="name">Name</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
|
@ -89,20 +89,20 @@
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="compression">Datenkomprimierung</string>
|
<string name="compression">Datenkomprimierung</string>
|
||||||
<!--ActionBar item-->
|
<!--ActionBar item-->
|
||||||
<string name="delete_node">Knoten löschen</string>
|
<string name="delete_device">Knoten löschen</string>
|
||||||
<!--Title for NodeSettingsFragment in create mode-->
|
<!--Title for DeviceSettingsFragment in create mode-->
|
||||||
<string name="add_node">Knoten hinzufügen</string>
|
<string name="add_device">Knoten hinzufügen</string>
|
||||||
<!--Menu item to confirm adding a node-->
|
<!--Menu item to confirm adding a device-->
|
||||||
<string name="add">Hinzufügen</string>
|
<string name="add">Hinzufügen</string>
|
||||||
<!--Title for NodeSettingsFragment in edit mode-->
|
<!--Title for DeviceSettingsFragment in edit mode-->
|
||||||
<string name="edit_node">Knoten bearbeiten</string>
|
<string name="edit_device">Knoten bearbeiten</string>
|
||||||
<!--Dialog shown when attempting to delete a node-->
|
<!--Dialog shown when attempting to delete a device-->
|
||||||
<string name="delete_node_confirm">Soll dieser Knoten wirklich gelöscht werden?</string>
|
<string name="delete_device_confirm">Soll dieser Knoten wirklich gelöscht werden?</string>
|
||||||
<!--Toast shown when trying to create a node with an empty ID-->
|
<!--Toast shown when trying to create a device with an empty ID-->
|
||||||
<string name="node_id_required">Die Knoten ID darf nicht leer sein</string>
|
<string name="device_id_required">Die Knoten ID darf nicht leer sein</string>
|
||||||
<!--Toast shown when trying to create a node with an empty name-->
|
<!--Toast shown when trying to create a device with an empty name-->
|
||||||
<string name="node_name_required">Der Knotenname darf nicht leer sein</string>
|
<string name="device_name_required">Der Knotenname darf nicht leer sein</string>
|
||||||
<!--Content description for node ID qr code icon-->
|
<!--Content description for device ID qr code icon-->
|
||||||
<string name="scan_qr_code_description">QR Code scannen</string>
|
<string name="scan_qr_code_description">QR Code scannen</string>
|
||||||
<!--Text for toast shown if the "scan QR code" intent fails with an ActivityNotFoundException-->
|
<!--Text for toast shown if the "scan QR code" intent fails with an ActivityNotFoundException-->
|
||||||
<string name="no_qr_scanner_installed">Sie haben keinen QR Scanner installiert, oder Ihr Scanner wird nicht unterstützt.
|
<string name="no_qr_scanner_installed">Sie haben keinen QR Scanner installiert, oder Ihr Scanner wird nicht unterstützt.
|
||||||
|
@ -132,9 +132,9 @@ Bitte installieren Sie einen Scanner oder geben Sie die Knoten ID manuell ein.</
|
||||||
<!--Title for the preference to set STTRACE parameters-->
|
<!--Title for the preference to set STTRACE parameters-->
|
||||||
<string name="sttrace_title">Fehlersuchoptionen</string>
|
<string name="sttrace_title">Fehlersuchoptionen</string>
|
||||||
<!--Settings item that opens issue tracker-->
|
<!--Settings item that opens issue tracker-->
|
||||||
<string name="report_issue_title">Fehler berichten</string>
|
<string name="folderrt_issue_title">Fehler berichten</string>
|
||||||
<!--Summary for the issue tracker settings item-->
|
<!--Summary for the issue tracker settings item-->
|
||||||
<string name="report_issue_summary">Syncthing-Android Fehler-Sammlung öffnen</string>
|
<string name="folderrt_issue_summary">Syncthing-Android Fehler-Sammlung öffnen</string>
|
||||||
<!--URL of the issue tracker-->
|
<!--URL of the issue tracker-->
|
||||||
<!--Title of the preference showing upstream version name-->
|
<!--Title of the preference showing upstream version name-->
|
||||||
<string name="syncthing_version_title">Syncthing Version</string>
|
<string name="syncthing_version_title">Syncthing Version</string>
|
||||||
|
@ -144,7 +144,7 @@ Bitte installieren Sie einen Scanner oder geben Sie die Knoten ID manuell ein.</
|
||||||
<!--ListView empty text-->
|
<!--ListView empty text-->
|
||||||
<string name="directory_empty">Ordner ist leer</string>
|
<string name="directory_empty">Ordner ist leer</string>
|
||||||
<!--Menu item to create folder-->
|
<!--Menu item to create folder-->
|
||||||
<string name="create_folder">Erstelle neuen Ordner</string>
|
<string name="create_fs_folder">Erstelle neuen Ordner</string>
|
||||||
<!--Menu item to select the current folder-->
|
<!--Menu item to select the current folder-->
|
||||||
<string name="select_folder">Ordner auswählen</string>
|
<string name="select_folder">Ordner auswählen</string>
|
||||||
<!--SyncthingService-->
|
<!--SyncthingService-->
|
||||||
|
@ -167,8 +167,8 @@ Bitte installieren Sie einen Scanner oder geben Sie die Knoten ID manuell ein.</
|
||||||
<string name="restart_notification_text">Klicken Sie hier um Syncthing neu zu starten</string>
|
<string name="restart_notification_text">Klicken Sie hier um Syncthing neu zu starten</string>
|
||||||
<!--Text for the dismiss button of the restart Activity-->
|
<!--Text for the dismiss button of the restart Activity-->
|
||||||
<string name="restart_later">Später neu starten</string>
|
<string name="restart_later">Später neu starten</string>
|
||||||
<!--Shown when a node ID is copied to the clipboard-->
|
<!--Shown when a device ID is copied to the clipboard-->
|
||||||
<string name="node_id_copied_to_clipboard">Knoten ID in die Zwischenablage kopiert</string>
|
<string name="device_id_copied_to_clipboard">Knoten ID in die Zwischenablage kopiert</string>
|
||||||
<!--Strings representing units for file sizes, from smallest to largest-->
|
<!--Strings representing units for file sizes, from smallest to largest-->
|
||||||
<string-array name="file_size_units">
|
<string-array name="file_size_units">
|
||||||
<item>B</item>
|
<item>B</item>
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
<!--MainActivity-->
|
<!--MainActivity-->
|
||||||
<!--Title of the "add repo" menu action-->
|
<!--Title of the "add folder" menu action-->
|
||||||
<!--Title of the "share node id" menu action-->
|
<!--Title of the "share device id" menu action-->
|
||||||
<!--Shown in the chooser dialog when sharing a Node ID-->
|
<!--Shown in the chooser dialog when sharing a Device ID-->
|
||||||
<!--Text for RepositoriesFragment and NodesFragment loading view-->
|
<!--Text for FolderFragment and DevicesFragment loading view-->
|
||||||
<!--RepositoriesFragment-->
|
<!--FolderFragment-->
|
||||||
<!--Format string for repository progress. First parameter is status string, second is sync percentage-->
|
<!--Format string for folder progress. First parameter is status string, second is sync percentage-->
|
||||||
<!--Shown if no repos exist-->
|
<!--Shown if no folders exist-->
|
||||||
<!--Format string for repository file count-->
|
<!--Format string for folder file count-->
|
||||||
<!--NodesFragment-->
|
<!--DevicesFragment-->
|
||||||
<!--Shown if no nodes exist-->
|
<!--Shown if no devices exist-->
|
||||||
<!--Indicates that a repo is fully synced to the local node-->
|
<!--Indicates that a folder is fully synced to the local device-->
|
||||||
<!--Indicates that the node is currently syncing. Parameter is sync percentage-->
|
<!--Indicates that the device is currently syncing. Parameter is sync percentage-->
|
||||||
<!--Indicates that there is no connection to the node-->
|
<!--Indicates that there is no connection to the device-->
|
||||||
<!--Title for current download rate-->
|
<!--Title for current download rate-->
|
||||||
<!--Title for current upload rate-->
|
<!--Title for current upload rate-->
|
||||||
<!--LocalNodeInfoFragment-->
|
<!--LocalDeviceInfoFragment-->
|
||||||
<!--ActionBar title shown when the drawer is open-->
|
<!--ActionBar title shown when the drawer is open-->
|
||||||
<!--Same as download_title with a colon and space appended-->
|
<!--Same as download_title with a colon and space appended-->
|
||||||
<!--Same as upload_title with a colon and space appended-->
|
<!--Same as upload_title with a colon and space appended-->
|
||||||
<!--Title for current CPU usage-->
|
<!--Title for current CPU usage-->
|
||||||
<!--Title for current RAM usage-->
|
<!--Title for current RAM usage-->
|
||||||
<!--Title for announce server status-->
|
<!--Title for announce server status-->
|
||||||
<!--RepoSettingsFragment-->
|
<!--FolderSettingsFragment-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
|
@ -32,27 +32,27 @@
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Title for RepoSettingsFragment in create mode-->
|
<!--Title for FolderSettingsFragment in create mode-->
|
||||||
<!--Title for RepoSettingsFragment in edit mode-->
|
<!--Title for FolderSettingsFragment in edit mode-->
|
||||||
<!--Menu item to confirm repo creation-->
|
<!--Menu item to confirm folder creation-->
|
||||||
<!--Dialog shown when attempting to delete a repository-->
|
<!--Dialog shown when attempting to delete a folder-->
|
||||||
<!--Toast shown when trying to create a repository with an empty ID-->
|
<!--Toast shown when trying to create a folder with an empty ID-->
|
||||||
<!--Toast shown when trying to create a repository with an empty path-->
|
<!--Toast shown when trying to create a folder with an empty path-->
|
||||||
<!--Toast shown when selecting 'nodes' if no nodes have been added-->
|
<!--Toast shown when selecting 'devices' if no nodes have been added-->
|
||||||
<!--NodeSettingsFragment-->
|
<!--DeviceSettingsFragment-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--ActionBar item-->
|
<!--ActionBar item-->
|
||||||
<!--Title for NodeSettingsFragment in create mode-->
|
<!--Title for DeviceSettingsFragment in create mode-->
|
||||||
<!--Menu item to confirm adding a node-->
|
<!--Menu item to confirm adding a device-->
|
||||||
<!--Title for NodeSettingsFragment in edit mode-->
|
<!--Title for DeviceSettingsFragment in edit mode-->
|
||||||
<!--Dialog shown when attempting to delete a node-->
|
<!--Dialog shown when attempting to delete a device-->
|
||||||
<!--Toast shown when trying to create a node with an empty ID-->
|
<!--Toast shown when trying to create a device with an empty ID-->
|
||||||
<!--Toast shown when trying to create a node with an empty name-->
|
<!--Toast shown when trying to create a device with an empty name-->
|
||||||
<!--Content description for node ID qr code icon-->
|
<!--Content description for device ID qr code icon-->
|
||||||
<!--Text for toast shown if the "scan QR code" intent fails with an ActivityNotFoundException-->
|
<!--Text for toast shown if the "scan QR code" intent fails with an ActivityNotFoundException-->
|
||||||
<!--WebGuiActivity-->
|
<!--WebGuiActivity-->
|
||||||
<!--Title of the web gui activity-->
|
<!--Title of the web gui activity-->
|
||||||
|
@ -86,7 +86,7 @@
|
||||||
<!--Title of the notification shown when a restart is needed-->
|
<!--Title of the notification shown when a restart is needed-->
|
||||||
<!--Text of the notification shown when a restart is needed-->
|
<!--Text of the notification shown when a restart is needed-->
|
||||||
<!--Text for the dismiss button of the restart Activity-->
|
<!--Text for the dismiss button of the restart Activity-->
|
||||||
<!--Shown when a node ID is copied to the clipboard-->
|
<!--Shown when a device ID is copied to the clipboard-->
|
||||||
<!--Strings representing units for file sizes, from smallest to largest-->
|
<!--Strings representing units for file sizes, from smallest to largest-->
|
||||||
<!--Strings representing units for transfer rates, from smallest to largest-->
|
<!--Strings representing units for transfer rates, from smallest to largest-->
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
<!--MainActivity-->
|
<!--MainActivity-->
|
||||||
<!--Title of the "add repo" menu action-->
|
<!--Title of the "add folder" menu action-->
|
||||||
<!--Title of the "share node id" menu action-->
|
<!--Title of the "share device id" menu action-->
|
||||||
<!--Shown in the chooser dialog when sharing a Node ID-->
|
<!--Shown in the chooser dialog when sharing a Device ID-->
|
||||||
<!--Text for RepositoriesFragment and NodesFragment loading view-->
|
<!--Text for FolderFragment and DevicesFragment loading view-->
|
||||||
<!--RepositoriesFragment-->
|
<!--FolderFragment-->
|
||||||
<!--Format string for repository progress. First parameter is status string, second is sync percentage-->
|
<!--Format string for folder progress. First parameter is status string, second is sync percentage-->
|
||||||
<!--Shown if no repos exist-->
|
<!--Shown if no folders exist-->
|
||||||
<!--Format string for repository file count-->
|
<!--Format string for folder file count-->
|
||||||
<!--NodesFragment-->
|
<!--DevicesFragment-->
|
||||||
<!--Shown if no nodes exist-->
|
<!--Shown if no devices exist-->
|
||||||
<!--Indicates that a repo is fully synced to the local node-->
|
<!--Indicates that a folder is fully synced to the local device-->
|
||||||
<!--Indicates that the node is currently syncing. Parameter is sync percentage-->
|
<!--Indicates that the device is currently syncing. Parameter is sync percentage-->
|
||||||
<!--Indicates that there is no connection to the node-->
|
<!--Indicates that there is no connection to the device-->
|
||||||
<!--Title for current download rate-->
|
<!--Title for current download rate-->
|
||||||
<!--Title for current upload rate-->
|
<!--Title for current upload rate-->
|
||||||
<!--LocalNodeInfoFragment-->
|
<!--LocalDeviceInfoFragment-->
|
||||||
<!--ActionBar title shown when the drawer is open-->
|
<!--ActionBar title shown when the drawer is open-->
|
||||||
<!--Same as download_title with a colon and space appended-->
|
<!--Same as download_title with a colon and space appended-->
|
||||||
<!--Same as upload_title with a colon and space appended-->
|
<!--Same as upload_title with a colon and space appended-->
|
||||||
<!--Title for current CPU usage-->
|
<!--Title for current CPU usage-->
|
||||||
<!--Title for current RAM usage-->
|
<!--Title for current RAM usage-->
|
||||||
<!--Title for announce server status-->
|
<!--Title for announce server status-->
|
||||||
<!--RepoSettingsFragment-->
|
<!--FolderSettingsFragment-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
|
@ -32,27 +32,27 @@
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Title for RepoSettingsFragment in create mode-->
|
<!--Title for FolderSettingsFragment in create mode-->
|
||||||
<!--Title for RepoSettingsFragment in edit mode-->
|
<!--Title for FolderSettingsFragment in edit mode-->
|
||||||
<!--Menu item to confirm repo creation-->
|
<!--Menu item to confirm folder creation-->
|
||||||
<!--Dialog shown when attempting to delete a repository-->
|
<!--Dialog shown when attempting to delete a folder-->
|
||||||
<!--Toast shown when trying to create a repository with an empty ID-->
|
<!--Toast shown when trying to create a folder with an empty ID-->
|
||||||
<!--Toast shown when trying to create a repository with an empty path-->
|
<!--Toast shown when trying to create a folder with an empty path-->
|
||||||
<!--Toast shown when selecting 'nodes' if no nodes have been added-->
|
<!--Toast shown when selecting 'devices' if no nodes have been added-->
|
||||||
<!--NodeSettingsFragment-->
|
<!--DeviceSettingsFragment-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--ActionBar item-->
|
<!--ActionBar item-->
|
||||||
<!--Title for NodeSettingsFragment in create mode-->
|
<!--Title for DeviceSettingsFragment in create mode-->
|
||||||
<!--Menu item to confirm adding a node-->
|
<!--Menu item to confirm adding a device-->
|
||||||
<!--Title for NodeSettingsFragment in edit mode-->
|
<!--Title for DeviceSettingsFragment in edit mode-->
|
||||||
<!--Dialog shown when attempting to delete a node-->
|
<!--Dialog shown when attempting to delete a device-->
|
||||||
<!--Toast shown when trying to create a node with an empty ID-->
|
<!--Toast shown when trying to create a device with an empty ID-->
|
||||||
<!--Toast shown when trying to create a node with an empty name-->
|
<!--Toast shown when trying to create a device with an empty name-->
|
||||||
<!--Content description for node ID qr code icon-->
|
<!--Content description for device ID qr code icon-->
|
||||||
<!--Text for toast shown if the "scan QR code" intent fails with an ActivityNotFoundException-->
|
<!--Text for toast shown if the "scan QR code" intent fails with an ActivityNotFoundException-->
|
||||||
<!--WebGuiActivity-->
|
<!--WebGuiActivity-->
|
||||||
<!--Title of the web gui activity-->
|
<!--Title of the web gui activity-->
|
||||||
|
@ -86,7 +86,7 @@
|
||||||
<!--Title of the notification shown when a restart is needed-->
|
<!--Title of the notification shown when a restart is needed-->
|
||||||
<!--Text of the notification shown when a restart is needed-->
|
<!--Text of the notification shown when a restart is needed-->
|
||||||
<!--Text for the dismiss button of the restart Activity-->
|
<!--Text for the dismiss button of the restart Activity-->
|
||||||
<!--Shown when a node ID is copied to the clipboard-->
|
<!--Shown when a device ID is copied to the clipboard-->
|
||||||
<!--Strings representing units for file sizes, from smallest to largest-->
|
<!--Strings representing units for file sizes, from smallest to largest-->
|
||||||
<!--Strings representing units for transfer rates, from smallest to largest-->
|
<!--Strings representing units for transfer rates, from smallest to largest-->
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -2,37 +2,37 @@
|
||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
<string name="app_name">Syncthing</string>
|
<string name="app_name">Syncthing</string>
|
||||||
<!--MainActivity-->
|
<!--MainActivity-->
|
||||||
<!--Title of the "add repo" menu action-->
|
<!--Title of the "add folder" menu action-->
|
||||||
<string name="add_repo">Ajouter un dépôt</string>
|
<string name="add_folder">Ajouter un dépôt</string>
|
||||||
<!--Title of the "share node id" menu action-->
|
<!--Title of the "share device id" menu action-->
|
||||||
<string name="share_node_id">Partager l\'ID du nœud</string>
|
<string name="share_device_id">Partager l\'ID du nœud</string>
|
||||||
<!--Shown in the chooser dialog when sharing a Node ID-->
|
<!--Shown in the chooser dialog when sharing a Device ID-->
|
||||||
<string name="send_node_id_to">Envoyer l\'ID du nœud vers</string>
|
<string name="send_device_id_to">Envoyer l\'ID du nœud vers</string>
|
||||||
<!--Text for RepositoriesFragment and NodesFragment loading view-->
|
<!--Text for FolderFragment and DevicesFragment loading view-->
|
||||||
<string name="api_loading">En attente de l\'API</string>
|
<string name="api_loading">En attente de l\'API</string>
|
||||||
<!--RepositoriesFragment-->
|
<!--FolderFragment-->
|
||||||
<string name="repositories_fragment_title">Dépôts</string>
|
<string name="Folder_fragment_title">Dépôts</string>
|
||||||
<!--Format string for repository progress. First parameter is status string, second is sync percentage-->
|
<!--Format string for folder progress. First parameter is status string, second is sync percentage-->
|
||||||
<string name="repo_progress_format">%1$s (%2$d%%)</string>
|
<string name="folder_progress_format">%1$s (%2$d%%)</string>
|
||||||
<!--Shown if no repos exist-->
|
<!--Shown if no folders exist-->
|
||||||
<string name="repositories_list_empty">Aucun dépôt trouvé</string>
|
<string name="Folder_list_empty">Aucun dépôt trouvé</string>
|
||||||
<!--Format string for repository file count-->
|
<!--Format string for folder file count-->
|
||||||
<string name="files">%1$d / %2$d fichiers</string>
|
<string name="files">%1$d / %2$d fichiers</string>
|
||||||
<!--NodesFragment-->
|
<!--DevicesFragment-->
|
||||||
<string name="nodes_fragment_title">Nœuds</string>
|
<string name="devices_fragment_title">Nœuds</string>
|
||||||
<!--Shown if no nodes exist-->
|
<!--Shown if no devices exist-->
|
||||||
<string name="nodes_list_empty">Aucun nœud trouvé</string>
|
<string name="devices_list_empty">Aucun nœud trouvé</string>
|
||||||
<!--Indicates that a repo is fully synced to the local node-->
|
<!--Indicates that a folder is fully synced to the local device-->
|
||||||
<string name="node_up_to_date">À jour</string>
|
<string name="device_up_to_date">À jour</string>
|
||||||
<!--Indicates that the node is currently syncing. Parameter is sync percentage-->
|
<!--Indicates that the device is currently syncing. Parameter is sync percentage-->
|
||||||
<string name="node_syncing">Synchronisation (%1$d%%)</string>
|
<string name="device_syncing">Synchronisation (%1$d%%)</string>
|
||||||
<!--Indicates that there is no connection to the node-->
|
<!--Indicates that there is no connection to the device-->
|
||||||
<string name="node_disconnected">Déconnecté</string>
|
<string name="device_disconnected">Déconnecté</string>
|
||||||
<!--Title for current download rate-->
|
<!--Title for current download rate-->
|
||||||
<string name="download_title">Téléchargement</string>
|
<string name="download_title">Téléchargement</string>
|
||||||
<!--Title for current upload rate-->
|
<!--Title for current upload rate-->
|
||||||
<string name="upload_title">Téléversement</string>
|
<string name="upload_title">Téléversement</string>
|
||||||
<!--LocalNodeInfoFragment-->
|
<!--LocalDeviceInfoFragment-->
|
||||||
<!--ActionBar title shown when the drawer is open-->
|
<!--ActionBar title shown when the drawer is open-->
|
||||||
<string name="system_info">Informations du système</string>
|
<string name="system_info">Informations du système</string>
|
||||||
<!--Same as download_title with a colon and space appended-->
|
<!--Same as download_title with a colon and space appended-->
|
||||||
|
@ -45,39 +45,39 @@
|
||||||
<string name="ram_usage">Utilisation de la RAM</string>
|
<string name="ram_usage">Utilisation de la RAM</string>
|
||||||
<!--Title for announce server status-->
|
<!--Title for announce server status-->
|
||||||
<string name="announce_server">Serveur d\'annonce</string>
|
<string name="announce_server">Serveur d\'annonce</string>
|
||||||
<!--RepoSettingsFragment-->
|
<!--FolderSettingsFragment-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="repo_id">ID du dépôt</string>
|
<string name="folder_id">ID du dépôt</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="directory">Dossier</string>
|
<string name="directory">Dossier</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="repo_master">Maître du dépôt</string>
|
<string name="folder_master">Maître du dépôt</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="nodes">Nœuds</string>
|
<string name="devices">Nœuds</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="file_versioning">Gestion des versions</string>
|
<string name="file_versioning">Gestion des versions</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="keep_versions">Conserver les versions</string>
|
<string name="keep_versions">Conserver les versions</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="delete_repo">Supprimer le dépôt</string>
|
<string name="delete_folder">Supprimer le dépôt</string>
|
||||||
<!--Title for RepoSettingsFragment in create mode-->
|
<!--Title for FolderSettingsFragment in create mode-->
|
||||||
<string name="create_repo">Créer un dépôt</string>
|
<string name="create_folder">Créer un dépôt</string>
|
||||||
<!--Title for RepoSettingsFragment in edit mode-->
|
<!--Title for FolderSettingsFragment in edit mode-->
|
||||||
<string name="edit_repo">Modifier le dépôt</string>
|
<string name="edit_folder">Modifier le dépôt</string>
|
||||||
<!--Menu item to confirm repo creation-->
|
<!--Menu item to confirm folder creation-->
|
||||||
<string name="create">Créer</string>
|
<string name="create">Créer</string>
|
||||||
<!--Dialog shown when attempting to delete a repository-->
|
<!--Dialog shown when attempting to delete a folder-->
|
||||||
<string name="delete_repo_confirm">Voulez-vous vraiment supprimer ce dépôt ?</string>
|
<string name="delete_folder_confirm">Voulez-vous vraiment supprimer ce dépôt ?</string>
|
||||||
<!--Toast shown when trying to create a repository with an empty ID-->
|
<!--Toast shown when trying to create a folder with an empty ID-->
|
||||||
<string name="repo_id_required">L\'ID du dépôt ne doit pas être vide</string>
|
<string name="folder_id_required">L\'ID du dépôt ne doit pas être vide</string>
|
||||||
<!--Toast shown when trying to create a repository with an empty path-->
|
<!--Toast shown when trying to create a folder with an empty path-->
|
||||||
<string name="repo_path_required">Le chemin vers le dépôt ne doit pas être vide</string>
|
<string name="folder_path_required">Le chemin vers le dépôt ne doit pas être vide</string>
|
||||||
<!--Toast shown when selecting 'nodes' if no nodes have been added-->
|
<!--Toast shown when selecting 'devices' if no nodes have been added-->
|
||||||
<string name="no_nodes">Veuillez d\'abord vous connecter à un nœud.</string>
|
<string name="no_devices">Veuillez d\'abord vous connecter à un nœud.</string>
|
||||||
<!--NodeSettingsFragment-->
|
<!--DeviceSettingsFragment-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="node_id">ID du nœud</string>
|
<string name="device_id">ID du nœud</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="name">Nom</string>
|
<string name="name">Nom</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
|
@ -86,20 +86,20 @@
|
||||||
<string name="current_address">Adresses actuelles</string>
|
<string name="current_address">Adresses actuelles</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--ActionBar item-->
|
<!--ActionBar item-->
|
||||||
<string name="delete_node">Supprimer le nœud</string>
|
<string name="delete_device">Supprimer le nœud</string>
|
||||||
<!--Title for NodeSettingsFragment in create mode-->
|
<!--Title for DeviceSettingsFragment in create mode-->
|
||||||
<string name="add_node">Ajouter un nœud</string>
|
<string name="add_device">Ajouter un nœud</string>
|
||||||
<!--Menu item to confirm adding a node-->
|
<!--Menu item to confirm adding a device-->
|
||||||
<string name="add">Ajouter</string>
|
<string name="add">Ajouter</string>
|
||||||
<!--Title for NodeSettingsFragment in edit mode-->
|
<!--Title for DeviceSettingsFragment in edit mode-->
|
||||||
<string name="edit_node">Modifier le nœud</string>
|
<string name="edit_device">Modifier le nœud</string>
|
||||||
<!--Dialog shown when attempting to delete a node-->
|
<!--Dialog shown when attempting to delete a device-->
|
||||||
<string name="delete_node_confirm">Voulez-vous vraiment supprimer ce nœud ?</string>
|
<string name="delete_device_confirm">Voulez-vous vraiment supprimer ce nœud ?</string>
|
||||||
<!--Toast shown when trying to create a node with an empty ID-->
|
<!--Toast shown when trying to create a device with an empty ID-->
|
||||||
<string name="node_id_required">L\'ID du nœud ne doit pas être vide</string>
|
<string name="device_id_required">L\'ID du nœud ne doit pas être vide</string>
|
||||||
<!--Toast shown when trying to create a node with an empty name-->
|
<!--Toast shown when trying to create a device with an empty name-->
|
||||||
<string name="node_name_required">Le nom du nœud ne doit pas être vide</string>
|
<string name="device_name_required">Le nom du nœud ne doit pas être vide</string>
|
||||||
<!--Content description for node ID qr code icon-->
|
<!--Content description for device ID qr code icon-->
|
||||||
<string name="scan_qr_code_description">Scanner un QR Code</string>
|
<string name="scan_qr_code_description">Scanner un QR Code</string>
|
||||||
<!--Text for toast shown if the "scan QR code" intent fails with an ActivityNotFoundException-->
|
<!--Text for toast shown if the "scan QR code" intent fails with an ActivityNotFoundException-->
|
||||||
<string name="no_qr_scanner_installed">Vous n\'avez pas de scanneur QR installé, ou votre scanneur n\'est pas compatible. \
|
<string name="no_qr_scanner_installed">Vous n\'avez pas de scanneur QR installé, ou votre scanneur n\'est pas compatible. \
|
||||||
|
@ -122,9 +122,9 @@ Veuillez installer un scanneur ou entrer l\'ID du nœud manuellement.</string>
|
||||||
<!--Preference summary in case it is disabled-->
|
<!--Preference summary in case it is disabled-->
|
||||||
<!--Title for the preference to set STTRACE parameters-->
|
<!--Title for the preference to set STTRACE parameters-->
|
||||||
<!--Settings item that opens issue tracker-->
|
<!--Settings item that opens issue tracker-->
|
||||||
<string name="report_issue_title">Signaler un problème</string>
|
<string name="folderrt_issue_title">Signaler un problème</string>
|
||||||
<!--Summary for the issue tracker settings item-->
|
<!--Summary for the issue tracker settings item-->
|
||||||
<string name="report_issue_summary">Ouvrir le système de suivi des problèmes de Syncthing-Android</string>
|
<string name="folderrt_issue_summary">Ouvrir le système de suivi des problèmes de Syncthing-Android</string>
|
||||||
<!--URL of the issue tracker-->
|
<!--URL of the issue tracker-->
|
||||||
<!--Title of the preference showing upstream version name-->
|
<!--Title of the preference showing upstream version name-->
|
||||||
<string name="syncthing_version_title">Version de Syncthing</string>
|
<string name="syncthing_version_title">Version de Syncthing</string>
|
||||||
|
@ -134,7 +134,7 @@ Veuillez installer un scanneur ou entrer l\'ID du nœud manuellement.</string>
|
||||||
<!--ListView empty text-->
|
<!--ListView empty text-->
|
||||||
<string name="directory_empty">Le dossier est vide</string>
|
<string name="directory_empty">Le dossier est vide</string>
|
||||||
<!--Menu item to create folder-->
|
<!--Menu item to create folder-->
|
||||||
<string name="create_folder">Créer un nouveau dossier</string>
|
<string name="create_fs_folder">Créer un nouveau dossier</string>
|
||||||
<!--Menu item to select the current folder-->
|
<!--Menu item to select the current folder-->
|
||||||
<string name="select_folder">Sélectionner ce dossier</string>
|
<string name="select_folder">Sélectionner ce dossier</string>
|
||||||
<!--SyncthingService-->
|
<!--SyncthingService-->
|
||||||
|
@ -153,8 +153,8 @@ Veuillez installer un scanneur ou entrer l\'ID du nœud manuellement.</string>
|
||||||
<string name="restart_notification_text">Cliquez ici pour redémarrer Syncthing</string>
|
<string name="restart_notification_text">Cliquez ici pour redémarrer Syncthing</string>
|
||||||
<!--Text for the dismiss button of the restart Activity-->
|
<!--Text for the dismiss button of the restart Activity-->
|
||||||
<string name="restart_later">Redémarrer plus tard</string>
|
<string name="restart_later">Redémarrer plus tard</string>
|
||||||
<!--Shown when a node ID is copied to the clipboard-->
|
<!--Shown when a device ID is copied to the clipboard-->
|
||||||
<string name="node_id_copied_to_clipboard">ID du nœud copié dans le presse-papier.</string>
|
<string name="device_id_copied_to_clipboard">ID du nœud copié dans le presse-papier.</string>
|
||||||
<!--Strings representing units for file sizes, from smallest to largest-->
|
<!--Strings representing units for file sizes, from smallest to largest-->
|
||||||
<string-array name="file_size_units">
|
<string-array name="file_size_units">
|
||||||
<item>o</item>
|
<item>o</item>
|
||||||
|
|
|
@ -2,37 +2,37 @@
|
||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
<string name="app_name">Syncthing</string>
|
<string name="app_name">Syncthing</string>
|
||||||
<!--MainActivity-->
|
<!--MainActivity-->
|
||||||
<!--Title of the "add repo" menu action-->
|
<!--Title of the "add folder" menu action-->
|
||||||
<string name="add_repo">Nuovo Deposito</string>
|
<string name="add_folder">Nuovo Deposito</string>
|
||||||
<!--Title of the "share node id" menu action-->
|
<!--Title of the "share device id" menu action-->
|
||||||
<string name="share_node_id">Condividi ID Nodo</string>
|
<string name="share_device_id">Condividi ID Nodo</string>
|
||||||
<!--Shown in the chooser dialog when sharing a Node ID-->
|
<!--Shown in the chooser dialog when sharing a Device ID-->
|
||||||
<string name="send_node_id_to">Invia ID Nodo tramite</string>
|
<string name="send_device_id_to">Invia ID Nodo tramite</string>
|
||||||
<!--Text for RepositoriesFragment and NodesFragment loading view-->
|
<!--Text for FolderFragment and DevicesFragment loading view-->
|
||||||
<string name="api_loading">Caricamento API</string>
|
<string name="api_loading">Caricamento API</string>
|
||||||
<!--RepositoriesFragment-->
|
<!--FolderFragment-->
|
||||||
<string name="repositories_fragment_title">Depositi</string>
|
<string name="Folder_fragment_title">Depositi</string>
|
||||||
<!--Format string for repository progress. First parameter is status string, second is sync percentage-->
|
<!--Format string for folder progress. First parameter is status string, second is sync percentage-->
|
||||||
<string name="repo_progress_format">%1$s (%2$d%%)</string>
|
<string name="folder_progress_format">%1$s (%2$d%%)</string>
|
||||||
<!--Shown if no repos exist-->
|
<!--Shown if no folders exist-->
|
||||||
<string name="repositories_list_empty">Nessun deposito</string>
|
<string name="Folder_list_empty">Nessun deposito</string>
|
||||||
<!--Format string for repository file count-->
|
<!--Format string for folder file count-->
|
||||||
<string name="files">%1$d / %2$d File</string>
|
<string name="files">%1$d / %2$d File</string>
|
||||||
<!--NodesFragment-->
|
<!--DevicesFragment-->
|
||||||
<string name="nodes_fragment_title">Nodi</string>
|
<string name="devices_fragment_title">Nodi</string>
|
||||||
<!--Shown if no nodes exist-->
|
<!--Shown if no devices exist-->
|
||||||
<string name="nodes_list_empty">Nessun nodo</string>
|
<string name="devices_list_empty">Nessun nodo</string>
|
||||||
<!--Indicates that a repo is fully synced to the local node-->
|
<!--Indicates that a folder is fully synced to the local device-->
|
||||||
<string name="node_up_to_date">Sincronizzato</string>
|
<string name="device_up_to_date">Sincronizzato</string>
|
||||||
<!--Indicates that the node is currently syncing. Parameter is sync percentage-->
|
<!--Indicates that the device is currently syncing. Parameter is sync percentage-->
|
||||||
<string name="node_syncing">Sincronizzazione (%1$d%%)</string>
|
<string name="device_syncing">Sincronizzazione (%1$d%%)</string>
|
||||||
<!--Indicates that there is no connection to the node-->
|
<!--Indicates that there is no connection to the device-->
|
||||||
<string name="node_disconnected">Disconnesso</string>
|
<string name="device_disconnected">Disconnesso</string>
|
||||||
<!--Title for current download rate-->
|
<!--Title for current download rate-->
|
||||||
<string name="download_title">Download</string>
|
<string name="download_title">Download</string>
|
||||||
<!--Title for current upload rate-->
|
<!--Title for current upload rate-->
|
||||||
<string name="upload_title">Upload</string>
|
<string name="upload_title">Upload</string>
|
||||||
<!--LocalNodeInfoFragment-->
|
<!--LocalDeviceInfoFragment-->
|
||||||
<!--ActionBar title shown when the drawer is open-->
|
<!--ActionBar title shown when the drawer is open-->
|
||||||
<string name="system_info">Info Sistema</string>
|
<string name="system_info">Info Sistema</string>
|
||||||
<!--Same as download_title with a colon and space appended-->
|
<!--Same as download_title with a colon and space appended-->
|
||||||
|
@ -45,39 +45,39 @@
|
||||||
<string name="ram_usage">Utilizzo RAM</string>
|
<string name="ram_usage">Utilizzo RAM</string>
|
||||||
<!--Title for announce server status-->
|
<!--Title for announce server status-->
|
||||||
<string name="announce_server">Server Presenza Globale</string>
|
<string name="announce_server">Server Presenza Globale</string>
|
||||||
<!--RepoSettingsFragment-->
|
<!--FolderSettingsFragment-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="repo_id">ID Deposito</string>
|
<string name="folder_id">ID Deposito</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="directory">Cartella</string>
|
<string name="directory">Cartella</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="repo_master">Deposito Principale</string>
|
<string name="folder_master">Deposito Principale</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="nodes">Nodi</string>
|
<string name="devices">Nodi</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="file_versioning">Controllo Versione File</string>
|
<string name="file_versioning">Controllo Versione File</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="keep_versions">Versioni Mantenute</string>
|
<string name="keep_versions">Versioni Mantenute</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="delete_repo">Elimina Deposito</string>
|
<string name="delete_folder">Elimina Deposito</string>
|
||||||
<!--Title for RepoSettingsFragment in create mode-->
|
<!--Title for FolderSettingsFragment in create mode-->
|
||||||
<string name="create_repo">Crea Deposito</string>
|
<string name="create_folder">Crea Deposito</string>
|
||||||
<!--Title for RepoSettingsFragment in edit mode-->
|
<!--Title for FolderSettingsFragment in edit mode-->
|
||||||
<string name="edit_repo">Modifica Deposito</string>
|
<string name="edit_folder">Modifica Deposito</string>
|
||||||
<!--Menu item to confirm repo creation-->
|
<!--Menu item to confirm folder creation-->
|
||||||
<string name="create">Crea</string>
|
<string name="create">Crea</string>
|
||||||
<!--Dialog shown when attempting to delete a repository-->
|
<!--Dialog shown when attempting to delete a folder-->
|
||||||
<string name="delete_repo_confirm">Vuoi veramente eliminare questo deposito?</string>
|
<string name="delete_folder_confirm">Vuoi veramente eliminare questo deposito?</string>
|
||||||
<!--Toast shown when trying to create a repository with an empty ID-->
|
<!--Toast shown when trying to create a folder with an empty ID-->
|
||||||
<string name="repo_id_required">L\'ID Deposito non può essere vuoto</string>
|
<string name="folder_id_required">L\'ID Deposito non può essere vuoto</string>
|
||||||
<!--Toast shown when trying to create a repository with an empty path-->
|
<!--Toast shown when trying to create a folder with an empty path-->
|
||||||
<string name="repo_path_required">Il percorso del deposito non può essere vuoto</string>
|
<string name="folder_path_required">Il percorso del deposito non può essere vuoto</string>
|
||||||
<!--Toast shown when selecting 'nodes' if no nodes have been added-->
|
<!--Toast shown when selecting 'devices' if no nodes have been added-->
|
||||||
<string name="no_nodes">Prima devi connettere un nodo.</string>
|
<string name="no_devices">Prima devi connettere un nodo.</string>
|
||||||
<!--NodeSettingsFragment-->
|
<!--DeviceSettingsFragment-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="node_id">ID Nodo</string>
|
<string name="device_id">ID Nodo</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="name">Nome</string>
|
<string name="name">Nome</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
|
@ -87,20 +87,20 @@
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="compression">Compressione</string>
|
<string name="compression">Compressione</string>
|
||||||
<!--ActionBar item-->
|
<!--ActionBar item-->
|
||||||
<string name="delete_node">Elimina Nodo</string>
|
<string name="delete_device">Elimina Nodo</string>
|
||||||
<!--Title for NodeSettingsFragment in create mode-->
|
<!--Title for DeviceSettingsFragment in create mode-->
|
||||||
<string name="add_node">Nuovo Nodo</string>
|
<string name="add_device">Nuovo Nodo</string>
|
||||||
<!--Menu item to confirm adding a node-->
|
<!--Menu item to confirm adding a device-->
|
||||||
<string name="add">Aggiungi</string>
|
<string name="add">Aggiungi</string>
|
||||||
<!--Title for NodeSettingsFragment in edit mode-->
|
<!--Title for DeviceSettingsFragment in edit mode-->
|
||||||
<string name="edit_node">Modifica Nodo</string>
|
<string name="edit_device">Modifica Nodo</string>
|
||||||
<!--Dialog shown when attempting to delete a node-->
|
<!--Dialog shown when attempting to delete a device-->
|
||||||
<string name="delete_node_confirm">Vuoi veramente eliminare questo nodo?</string>
|
<string name="delete_device_confirm">Vuoi veramente eliminare questo nodo?</string>
|
||||||
<!--Toast shown when trying to create a node with an empty ID-->
|
<!--Toast shown when trying to create a device with an empty ID-->
|
||||||
<string name="node_id_required">L\'ID Nodo non può essere vuoto</string>
|
<string name="device_id_required">L\'ID Nodo non può essere vuoto</string>
|
||||||
<!--Toast shown when trying to create a node with an empty name-->
|
<!--Toast shown when trying to create a device with an empty name-->
|
||||||
<string name="node_name_required">Il nome del nodo non può essere vuoto</string>
|
<string name="device_name_required">Il nome del nodo non può essere vuoto</string>
|
||||||
<!--Content description for node ID qr code icon-->
|
<!--Content description for device ID qr code icon-->
|
||||||
<string name="scan_qr_code_description">Scansiona Codice QR</string>
|
<string name="scan_qr_code_description">Scansiona Codice QR</string>
|
||||||
<!--Text for toast shown if the "scan QR code" intent fails with an ActivityNotFoundException-->
|
<!--Text for toast shown if the "scan QR code" intent fails with an ActivityNotFoundException-->
|
||||||
<string name="no_qr_scanner_installed">Non hai installato nessun lettore di Codici QR o il tuo lettore non è supportato. \
|
<string name="no_qr_scanner_installed">Non hai installato nessun lettore di Codici QR o il tuo lettore non è supportato. \
|
||||||
|
@ -124,9 +124,9 @@ Installare un lettore o inserire l\'ID del nodo manualmente.</string>
|
||||||
<!--Title for the preference to set STTRACE parameters-->
|
<!--Title for the preference to set STTRACE parameters-->
|
||||||
<string name="sttrace_title">Opzioni di Debug</string>
|
<string name="sttrace_title">Opzioni di Debug</string>
|
||||||
<!--Settings item that opens issue tracker-->
|
<!--Settings item that opens issue tracker-->
|
||||||
<string name="report_issue_title">Segnala Problema</string>
|
<string name="folderrt_issue_title">Segnala Problema</string>
|
||||||
<!--Summary for the issue tracker settings item-->
|
<!--Summary for the issue tracker settings item-->
|
||||||
<string name="report_issue_summary">Apre il registro problemi di Syncthing-Android</string>
|
<string name="folderrt_issue_summary">Apre il registro problemi di Syncthing-Android</string>
|
||||||
<!--URL of the issue tracker-->
|
<!--URL of the issue tracker-->
|
||||||
<!--Title of the preference showing upstream version name-->
|
<!--Title of the preference showing upstream version name-->
|
||||||
<string name="syncthing_version_title">Versione Syncthing</string>
|
<string name="syncthing_version_title">Versione Syncthing</string>
|
||||||
|
@ -136,7 +136,7 @@ Installare un lettore o inserire l\'ID del nodo manualmente.</string>
|
||||||
<!--ListView empty text-->
|
<!--ListView empty text-->
|
||||||
<string name="directory_empty">Cartella Vuota</string>
|
<string name="directory_empty">Cartella Vuota</string>
|
||||||
<!--Menu item to create folder-->
|
<!--Menu item to create folder-->
|
||||||
<string name="create_folder">Crea Nuova Cartella</string>
|
<string name="create_fs_folder">Crea Nuova Cartella</string>
|
||||||
<!--Menu item to select the current folder-->
|
<!--Menu item to select the current folder-->
|
||||||
<string name="select_folder">Seleziona Cartella</string>
|
<string name="select_folder">Seleziona Cartella</string>
|
||||||
<!--SyncthingService-->
|
<!--SyncthingService-->
|
||||||
|
@ -158,8 +158,8 @@ Installare un lettore o inserire l\'ID del nodo manualmente.</string>
|
||||||
<string name="restart_notification_text">Tap qui per riavviare adesso syncthing</string>
|
<string name="restart_notification_text">Tap qui per riavviare adesso syncthing</string>
|
||||||
<!--Text for the dismiss button of the restart Activity-->
|
<!--Text for the dismiss button of the restart Activity-->
|
||||||
<string name="restart_later">Riavvia Dopo</string>
|
<string name="restart_later">Riavvia Dopo</string>
|
||||||
<!--Shown when a node ID is copied to the clipboard-->
|
<!--Shown when a device ID is copied to the clipboard-->
|
||||||
<string name="node_id_copied_to_clipboard">ID Nodo copiato negli appunti</string>
|
<string name="device_id_copied_to_clipboard">ID Nodo copiato negli appunti</string>
|
||||||
<!--Strings representing units for file sizes, from smallest to largest-->
|
<!--Strings representing units for file sizes, from smallest to largest-->
|
||||||
<string-array name="file_size_units">
|
<string-array name="file_size_units">
|
||||||
<item>B</item>
|
<item>B</item>
|
||||||
|
|
|
@ -2,37 +2,37 @@
|
||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
<string name="app_name">Syncthing</string>
|
<string name="app_name">Syncthing</string>
|
||||||
<!--MainActivity-->
|
<!--MainActivity-->
|
||||||
<!--Title of the "add repo" menu action-->
|
<!--Title of the "add folder" menu action-->
|
||||||
<string name="add_repo">Pakketbron toevoegen</string>
|
<string name="add_folder">Pakketbron toevoegen</string>
|
||||||
<!--Title of the "share node id" menu action-->
|
<!--Title of the "share device id" menu action-->
|
||||||
<string name="share_node_id">Knooppunt-ID delen</string>
|
<string name="share_device_id">Knooppunt-ID delen</string>
|
||||||
<!--Shown in the chooser dialog when sharing a Node ID-->
|
<!--Shown in the chooser dialog when sharing a Device ID-->
|
||||||
<string name="send_node_id_to">Knooppunt-ID verzenden aan</string>
|
<string name="send_device_id_to">Knooppunt-ID verzenden aan</string>
|
||||||
<!--Text for RepositoriesFragment and NodesFragment loading view-->
|
<!--Text for FolderFragment and DevicesFragment loading view-->
|
||||||
<string name="api_loading">Wachten op API</string>
|
<string name="api_loading">Wachten op API</string>
|
||||||
<!--RepositoriesFragment-->
|
<!--FolderFragment-->
|
||||||
<string name="repositories_fragment_title">Pakketbronnen</string>
|
<string name="Folder_fragment_title">Pakketbronnen</string>
|
||||||
<!--Format string for repository progress. First parameter is status string, second is sync percentage-->
|
<!--Format string for folder progress. First parameter is status string, second is sync percentage-->
|
||||||
<string name="repo_progress_format">%1$s (%2$d%%)</string>
|
<string name="folder_progress_format">%1$s (%2$d%%)</string>
|
||||||
<!--Shown if no repos exist-->
|
<!--Shown if no folders exist-->
|
||||||
<string name="repositories_list_empty">Geen pakketbronnen gevonden</string>
|
<string name="Folder_list_empty">Geen pakketbronnen gevonden</string>
|
||||||
<!--Format string for repository file count-->
|
<!--Format string for folder file count-->
|
||||||
<string name="files">%1$d / %2$d bestanden</string>
|
<string name="files">%1$d / %2$d bestanden</string>
|
||||||
<!--NodesFragment-->
|
<!--DevicesFragment-->
|
||||||
<string name="nodes_fragment_title">Knooppunten</string>
|
<string name="devices_fragment_title">Knooppunten</string>
|
||||||
<!--Shown if no nodes exist-->
|
<!--Shown if no devices exist-->
|
||||||
<string name="nodes_list_empty">Geen knooppunten gevonden</string>
|
<string name="devices_list_empty">Geen knooppunten gevonden</string>
|
||||||
<!--Indicates that a repo is fully synced to the local node-->
|
<!--Indicates that a folder is fully synced to the local device-->
|
||||||
<string name="node_up_to_date">Bijgewerkt</string>
|
<string name="device_up_to_date">Bijgewerkt</string>
|
||||||
<!--Indicates that the node is currently syncing. Parameter is sync percentage-->
|
<!--Indicates that the device is currently syncing. Parameter is sync percentage-->
|
||||||
<string name="node_syncing">Bezig met synchroniseren (%1$d%%)</string>
|
<string name="device_syncing">Bezig met synchroniseren (%1$d%%)</string>
|
||||||
<!--Indicates that there is no connection to the node-->
|
<!--Indicates that there is no connection to the device-->
|
||||||
<string name="node_disconnected">Niet verbonden</string>
|
<string name="device_disconnected">Niet verbonden</string>
|
||||||
<!--Title for current download rate-->
|
<!--Title for current download rate-->
|
||||||
<string name="download_title">Download</string>
|
<string name="download_title">Download</string>
|
||||||
<!--Title for current upload rate-->
|
<!--Title for current upload rate-->
|
||||||
<string name="upload_title">Upload</string>
|
<string name="upload_title">Upload</string>
|
||||||
<!--LocalNodeInfoFragment-->
|
<!--LocalDeviceInfoFragment-->
|
||||||
<!--ActionBar title shown when the drawer is open-->
|
<!--ActionBar title shown when the drawer is open-->
|
||||||
<string name="system_info">Systeeminformatie</string>
|
<string name="system_info">Systeeminformatie</string>
|
||||||
<!--Same as download_title with a colon and space appended-->
|
<!--Same as download_title with a colon and space appended-->
|
||||||
|
@ -45,39 +45,39 @@
|
||||||
<string name="ram_usage">RAM-gebrui</string>
|
<string name="ram_usage">RAM-gebrui</string>
|
||||||
<!--Title for announce server status-->
|
<!--Title for announce server status-->
|
||||||
<string name="announce_server">Mededelingsserver</string>
|
<string name="announce_server">Mededelingsserver</string>
|
||||||
<!--RepoSettingsFragment-->
|
<!--FolderSettingsFragment-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="repo_id">Pakketbron-ID</string>
|
<string name="folder_id">Pakketbron-ID</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="directory">Map</string>
|
<string name="directory">Map</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="repo_master">Pakketbronmeester</string>
|
<string name="folder_master">Pakketbronmeester</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="nodes">Knooppunten</string>
|
<string name="devices">Knooppunten</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="file_versioning">Bestandsversies</string>
|
<string name="file_versioning">Bestandsversies</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="keep_versions">Versies behouden</string>
|
<string name="keep_versions">Versies behouden</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="delete_repo">Pakketbron verwijderen</string>
|
<string name="delete_folder">Pakketbron verwijderen</string>
|
||||||
<!--Title for RepoSettingsFragment in create mode-->
|
<!--Title for FolderSettingsFragment in create mode-->
|
||||||
<string name="create_repo">Pakketbron creëren</string>
|
<string name="create_folder">Pakketbron creëren</string>
|
||||||
<!--Title for RepoSettingsFragment in edit mode-->
|
<!--Title for FolderSettingsFragment in edit mode-->
|
||||||
<string name="edit_repo">Pakketbron bewerken</string>
|
<string name="edit_folder">Pakketbron bewerken</string>
|
||||||
<!--Menu item to confirm repo creation-->
|
<!--Menu item to confirm folder creation-->
|
||||||
<string name="create">Creëren</string>
|
<string name="create">Creëren</string>
|
||||||
<!--Dialog shown when attempting to delete a repository-->
|
<!--Dialog shown when attempting to delete a folder-->
|
||||||
<string name="delete_repo_confirm">Weet u zeker dat u deze pakketbron wilt verwijderen?</string>
|
<string name="delete_folder_confirm">Weet u zeker dat u deze pakketbron wilt verwijderen?</string>
|
||||||
<!--Toast shown when trying to create a repository with an empty ID-->
|
<!--Toast shown when trying to create a folder with an empty ID-->
|
||||||
<string name="repo_id_required">De pakketbron-ID mag niet leeg zijn</string>
|
<string name="folder_id_required">De pakketbron-ID mag niet leeg zijn</string>
|
||||||
<!--Toast shown when trying to create a repository with an empty path-->
|
<!--Toast shown when trying to create a folder with an empty path-->
|
||||||
<string name="repo_path_required">Het pakketbron-pad mag niet leeg zijn</string>
|
<string name="folder_path_required">Het pakketbron-pad mag niet leeg zijn</string>
|
||||||
<!--Toast shown when selecting 'nodes' if no nodes have been added-->
|
<!--Toast shown when selecting 'devices' if no nodes have been added-->
|
||||||
<string name="no_nodes">Verbind eerst met een knooppunt.</string>
|
<string name="no_devices">Verbind eerst met een knooppunt.</string>
|
||||||
<!--NodeSettingsFragment-->
|
<!--DeviceSettingsFragment-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="node_id">Knooppunt-ID</string>
|
<string name="device_id">Knooppunt-ID</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="name">Naam</string>
|
<string name="name">Naam</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
|
@ -86,20 +86,20 @@
|
||||||
<string name="current_address">Huidig adres</string>
|
<string name="current_address">Huidig adres</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--ActionBar item-->
|
<!--ActionBar item-->
|
||||||
<string name="delete_node">Knooppunt verwijderen</string>
|
<string name="delete_device">Knooppunt verwijderen</string>
|
||||||
<!--Title for NodeSettingsFragment in create mode-->
|
<!--Title for DeviceSettingsFragment in create mode-->
|
||||||
<string name="add_node">Knooppunt toevoegen</string>
|
<string name="add_device">Knooppunt toevoegen</string>
|
||||||
<!--Menu item to confirm adding a node-->
|
<!--Menu item to confirm adding a device-->
|
||||||
<string name="add">Toevoegen</string>
|
<string name="add">Toevoegen</string>
|
||||||
<!--Title for NodeSettingsFragment in edit mode-->
|
<!--Title for DeviceSettingsFragment in edit mode-->
|
||||||
<string name="edit_node">Knooppunt bewerken</string>
|
<string name="edit_device">Knooppunt bewerken</string>
|
||||||
<!--Dialog shown when attempting to delete a node-->
|
<!--Dialog shown when attempting to delete a device-->
|
||||||
<string name="delete_node_confirm">Weet u zeker dat u dit knooppunt wilt verwijderen?</string>
|
<string name="delete_device_confirm">Weet u zeker dat u dit knooppunt wilt verwijderen?</string>
|
||||||
<!--Toast shown when trying to create a node with an empty ID-->
|
<!--Toast shown when trying to create a device with an empty ID-->
|
||||||
<string name="node_id_required">De knooppunt-ID mag niet leeg zijn</string>
|
<string name="device_id_required">De knooppunt-ID mag niet leeg zijn</string>
|
||||||
<!--Toast shown when trying to create a node with an empty name-->
|
<!--Toast shown when trying to create a device with an empty name-->
|
||||||
<string name="node_name_required">De knooppuntnaam mag niet leeg zijn</string>
|
<string name="device_name_required">De knooppuntnaam mag niet leeg zijn</string>
|
||||||
<!--Content description for node ID qr code icon-->
|
<!--Content description for device ID qr code icon-->
|
||||||
<string name="scan_qr_code_description">QR-code scannen</string>
|
<string name="scan_qr_code_description">QR-code scannen</string>
|
||||||
<!--Text for toast shown if the "scan QR code" intent fails with an ActivityNotFoundException-->
|
<!--Text for toast shown if the "scan QR code" intent fails with an ActivityNotFoundException-->
|
||||||
<string name="no_qr_scanner_installed">U heeft QR-code-scanner geïnstalleerd of uw scanner wordt niet ondersteund.\
|
<string name="no_qr_scanner_installed">U heeft QR-code-scanner geïnstalleerd of uw scanner wordt niet ondersteund.\
|
||||||
|
@ -122,9 +122,9 @@ Installeer een scanner of vul de knooppunt-ID handmatig in.</string>
|
||||||
<!--Preference summary in case it is disabled-->
|
<!--Preference summary in case it is disabled-->
|
||||||
<!--Title for the preference to set STTRACE parameters-->
|
<!--Title for the preference to set STTRACE parameters-->
|
||||||
<!--Settings item that opens issue tracker-->
|
<!--Settings item that opens issue tracker-->
|
||||||
<string name="report_issue_title">Probleem rapporteren</string>
|
<string name="folderrt_issue_title">Probleem rapporteren</string>
|
||||||
<!--Summary for the issue tracker settings item-->
|
<!--Summary for the issue tracker settings item-->
|
||||||
<string name="report_issue_summary">De Syncthing-Android probleemtracker openen</string>
|
<string name="folderrt_issue_summary">De Syncthing-Android probleemtracker openen</string>
|
||||||
<!--URL of the issue tracker-->
|
<!--URL of the issue tracker-->
|
||||||
<!--Title of the preference showing upstream version name-->
|
<!--Title of the preference showing upstream version name-->
|
||||||
<string name="syncthing_version_title">Synthing-versie</string>
|
<string name="syncthing_version_title">Synthing-versie</string>
|
||||||
|
@ -134,7 +134,7 @@ Installeer een scanner of vul de knooppunt-ID handmatig in.</string>
|
||||||
<!--ListView empty text-->
|
<!--ListView empty text-->
|
||||||
<string name="directory_empty">Map is leeg</string>
|
<string name="directory_empty">Map is leeg</string>
|
||||||
<!--Menu item to create folder-->
|
<!--Menu item to create folder-->
|
||||||
<string name="create_folder">Nieuwe map creëren</string>
|
<string name="create_fs_folder">Nieuwe map creëren</string>
|
||||||
<!--Menu item to select the current folder-->
|
<!--Menu item to select the current folder-->
|
||||||
<string name="select_folder">Map selecteren</string>
|
<string name="select_folder">Map selecteren</string>
|
||||||
<!--SyncthingService-->
|
<!--SyncthingService-->
|
||||||
|
@ -153,8 +153,8 @@ Installeer een scanner of vul de knooppunt-ID handmatig in.</string>
|
||||||
<string name="restart_notification_text">Klik hier om Syncthing nu te herstarten</string>
|
<string name="restart_notification_text">Klik hier om Syncthing nu te herstarten</string>
|
||||||
<!--Text for the dismiss button of the restart Activity-->
|
<!--Text for the dismiss button of the restart Activity-->
|
||||||
<string name="restart_later">Later herstarten</string>
|
<string name="restart_later">Later herstarten</string>
|
||||||
<!--Shown when a node ID is copied to the clipboard-->
|
<!--Shown when a device ID is copied to the clipboard-->
|
||||||
<string name="node_id_copied_to_clipboard">Knooppunt-ID gekopieerd naar klembord</string>
|
<string name="device_id_copied_to_clipboard">Knooppunt-ID gekopieerd naar klembord</string>
|
||||||
<!--Strings representing units for file sizes, from smallest to largest-->
|
<!--Strings representing units for file sizes, from smallest to largest-->
|
||||||
<string-array name="file_size_units">
|
<string-array name="file_size_units">
|
||||||
<item>B</item>
|
<item>B</item>
|
||||||
|
|
|
@ -2,37 +2,37 @@
|
||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
<string name="app_name">Syncthing</string>
|
<string name="app_name">Syncthing</string>
|
||||||
<!--MainActivity-->
|
<!--MainActivity-->
|
||||||
<!--Title of the "add repo" menu action-->
|
<!--Title of the "add folder" menu action-->
|
||||||
<string name="add_repo">Dodaj Repozytorium</string>
|
<string name="add_folder">Dodaj Folderzytorium</string>
|
||||||
<!--Title of the "share node id" menu action-->
|
<!--Title of the "share device id" menu action-->
|
||||||
<string name="share_node_id">Odostępnij ID Węzła</string>
|
<string name="share_device_id">Odostępnij ID Węzła</string>
|
||||||
<!--Shown in the chooser dialog when sharing a Node ID-->
|
<!--Shown in the chooser dialog when sharing a Device ID-->
|
||||||
<string name="send_node_id_to">Wyślij ID węzła do</string>
|
<string name="send_device_id_to">Wyślij ID węzła do</string>
|
||||||
<!--Text for RepositoriesFragment and NodesFragment loading view-->
|
<!--Text for FolderFragment and DevicesFragment loading view-->
|
||||||
<string name="api_loading">Oczekiwanie na API API</string>
|
<string name="api_loading">Oczekiwanie na API API</string>
|
||||||
<!--RepositoriesFragment-->
|
<!--FolderFragment-->
|
||||||
<string name="repositories_fragment_title">Repozytoria</string>
|
<string name="Folder_fragment_title">Folderzytoria</string>
|
||||||
<!--Format string for repository progress. First parameter is status string, second is sync percentage-->
|
<!--Format string for folder progress. First parameter is status string, second is sync percentage-->
|
||||||
<string name="repo_progress_format">%1$s (%2$d%%)</string>
|
<string name="folder_progress_format">%1$s (%2$d%%)</string>
|
||||||
<!--Shown if no repos exist-->
|
<!--Shown if no folders exist-->
|
||||||
<string name="repositories_list_empty">Brak znalezionych węzłów</string>
|
<string name="Folder_list_empty">Brak znalezionych węzłów</string>
|
||||||
<!--Format string for repository file count-->
|
<!--Format string for folder file count-->
|
||||||
<string name="files">%1$d / %2$d plików</string>
|
<string name="files">%1$d / %2$d plików</string>
|
||||||
<!--NodesFragment-->
|
<!--DevicesFragment-->
|
||||||
<string name="nodes_fragment_title">Węzły</string>
|
<string name="devices_fragment_title">Węzły</string>
|
||||||
<!--Shown if no nodes exist-->
|
<!--Shown if no devices exist-->
|
||||||
<string name="nodes_list_empty">Brak znalezionych węzłów</string>
|
<string name="devices_list_empty">Brak znalezionych węzłów</string>
|
||||||
<!--Indicates that a repo is fully synced to the local node-->
|
<!--Indicates that a folder is fully synced to the local device-->
|
||||||
<string name="node_up_to_date">Aktualne</string>
|
<string name="device_up_to_date">Aktualne</string>
|
||||||
<!--Indicates that the node is currently syncing. Parameter is sync percentage-->
|
<!--Indicates that the device is currently syncing. Parameter is sync percentage-->
|
||||||
<string name="node_syncing">Synchronizacja (%1$d%%)</string>
|
<string name="device_syncing">Synchronizacja (%1$d%%)</string>
|
||||||
<!--Indicates that there is no connection to the node-->
|
<!--Indicates that there is no connection to the device-->
|
||||||
<string name="node_disconnected">Rozłączono</string>
|
<string name="device_disconnected">Rozłączono</string>
|
||||||
<!--Title for current download rate-->
|
<!--Title for current download rate-->
|
||||||
<string name="download_title">Pobieranie</string>
|
<string name="download_title">Pobieranie</string>
|
||||||
<!--Title for current upload rate-->
|
<!--Title for current upload rate-->
|
||||||
<string name="upload_title">Wysyłanie</string>
|
<string name="upload_title">Wysyłanie</string>
|
||||||
<!--LocalNodeInfoFragment-->
|
<!--LocalDeviceInfoFragment-->
|
||||||
<!--ActionBar title shown when the drawer is open-->
|
<!--ActionBar title shown when the drawer is open-->
|
||||||
<string name="system_info">Informacje systemowe</string>
|
<string name="system_info">Informacje systemowe</string>
|
||||||
<!--Same as download_title with a colon and space appended-->
|
<!--Same as download_title with a colon and space appended-->
|
||||||
|
@ -45,39 +45,39 @@
|
||||||
<string name="ram_usage">Użycie RAMu</string>
|
<string name="ram_usage">Użycie RAMu</string>
|
||||||
<!--Title for announce server status-->
|
<!--Title for announce server status-->
|
||||||
<string name="announce_server">Ogłoś serwer</string>
|
<string name="announce_server">Ogłoś serwer</string>
|
||||||
<!--RepoSettingsFragment-->
|
<!--FolderSettingsFragment-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="repo_id">Repository ID</string>
|
<string name="folder_id">Folder ID</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="directory">Directory</string>
|
<string name="directory">Directory</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="repo_master">Repository Master</string>
|
<string name="folder_master">Folder Master</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="nodes">Nodes</string>
|
<string name="devices">Devices</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="file_versioning">File Versioning</string>
|
<string name="file_versioning">File Versioning</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="keep_versions">Keep Versions</string>
|
<string name="keep_versions">Keep Versions</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="delete_repo">Delete Repository</string>
|
<string name="delete_folder">Delete Folder</string>
|
||||||
<!--Title for RepoSettingsFragment in create mode-->
|
<!--Title for FolderSettingsFragment in create mode-->
|
||||||
<string name="create_repo">Create Repository</string>
|
<string name="create_folder">Create Folder</string>
|
||||||
<!--Title for RepoSettingsFragment in edit mode-->
|
<!--Title for FolderSettingsFragment in edit mode-->
|
||||||
<string name="edit_repo">Edit Repository</string>
|
<string name="edit_folder">Edit Folder</string>
|
||||||
<!--Menu item to confirm repo creation-->
|
<!--Menu item to confirm folder creation-->
|
||||||
<string name="create">Create</string>
|
<string name="create">Create</string>
|
||||||
<!--Dialog shown when attempting to delete a repository-->
|
<!--Dialog shown when attempting to delete a folder-->
|
||||||
<string name="delete_repo_confirm">Do you really want to delete this repository?</string>
|
<string name="delete_folder_confirm">Do you really want to delete this folder?</string>
|
||||||
<!--Toast shown when trying to create a repository with an empty ID-->
|
<!--Toast shown when trying to create a folder with an empty ID-->
|
||||||
<string name="repo_id_required">The repository ID must not be empty</string>
|
<string name="folder_id_required">The folder ID must not be empty</string>
|
||||||
<!--Toast shown when trying to create a repository with an empty path-->
|
<!--Toast shown when trying to create a folder with an empty path-->
|
||||||
<string name="repo_path_required">The repository path must not be empty</string>
|
<string name="folder_path_required">The folder path must not be empty</string>
|
||||||
<!--Toast shown when selecting 'nodes' if no nodes have been added-->
|
<!--Toast shown when selecting 'devices' if no nodes have been added-->
|
||||||
<string name="no_nodes">Please connect a node first.</string>
|
<string name="no_devices">Please connect a node first.</string>
|
||||||
<!--NodeSettingsFragment-->
|
<!--DeviceSettingsFragment-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="node_id">Node ID</string>
|
<string name="device_id">Device ID</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="name">Name</string>
|
<string name="name">Name</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
|
@ -86,24 +86,24 @@
|
||||||
<string name="current_address">Current Address</string>
|
<string name="current_address">Current Address</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--ActionBar item-->
|
<!--ActionBar item-->
|
||||||
<string name="delete_node">Delete Node</string>
|
<string name="delete_device">Delete Device</string>
|
||||||
<!--Title for NodeSettingsFragment in create mode-->
|
<!--Title for DeviceSettingsFragment in create mode-->
|
||||||
<string name="add_node">Add Node</string>
|
<string name="add_device">Add Device</string>
|
||||||
<!--Menu item to confirm adding a node-->
|
<!--Menu item to confirm adding a device-->
|
||||||
<string name="add">Add</string>
|
<string name="add">Add</string>
|
||||||
<!--Title for NodeSettingsFragment in edit mode-->
|
<!--Title for DeviceSettingsFragment in edit mode-->
|
||||||
<string name="edit_node">Edit Node</string>
|
<string name="edit_device">Edit Device</string>
|
||||||
<!--Dialog shown when attempting to delete a node-->
|
<!--Dialog shown when attempting to delete a device-->
|
||||||
<string name="delete_node_confirm">Do you really want to delete this node?</string>
|
<string name="delete_device_confirm">Do you really want to delete this node?</string>
|
||||||
<!--Toast shown when trying to create a node with an empty ID-->
|
<!--Toast shown when trying to create a device with an empty ID-->
|
||||||
<string name="node_id_required">The node ID must not be empty</string>
|
<string name="device_id_required">The node ID must not be empty</string>
|
||||||
<!--Toast shown when trying to create a node with an empty name-->
|
<!--Toast shown when trying to create a device with an empty name-->
|
||||||
<string name="node_name_required">The node name must not be empty</string>
|
<string name="device_name_required">The node name must not be empty</string>
|
||||||
<!--Content description for node ID qr code icon-->
|
<!--Content description for device ID qr code icon-->
|
||||||
<string name="scan_qr_code_description">Scan QR Code</string>
|
<string name="scan_qr_code_description">Scan QR Code</string>
|
||||||
<!--Text for toast shown if the "scan QR code" intent fails with an ActivityNotFoundException-->
|
<!--Text for toast shown if the "scan QR code" intent fails with an ActivityNotFoundException-->
|
||||||
<string name="no_qr_scanner_installed">You have no QR scanner installed or your scanner is not supported. \
|
<string name="no_qr_scanner_installed">You have no QR scanner installed or your scanner is not supported. \
|
||||||
Please install a scanner or enter the node ID manually.</string>
|
Please install a scanner or enter the device ID manually.</string>
|
||||||
<!--WebGuiActivity-->
|
<!--WebGuiActivity-->
|
||||||
<!--Title of the web gui activity-->
|
<!--Title of the web gui activity-->
|
||||||
<string name="web_gui_title">Web GUI</string>
|
<string name="web_gui_title">Web GUI</string>
|
||||||
|
@ -122,9 +122,9 @@ Please install a scanner or enter the node ID manually.</string>
|
||||||
<!--Preference summary in case it is disabled-->
|
<!--Preference summary in case it is disabled-->
|
||||||
<!--Title for the preference to set STTRACE parameters-->
|
<!--Title for the preference to set STTRACE parameters-->
|
||||||
<!--Settings item that opens issue tracker-->
|
<!--Settings item that opens issue tracker-->
|
||||||
<string name="report_issue_title">Report Issue</string>
|
<string name="folderrt_issue_title">Folderrt Issue</string>
|
||||||
<!--Summary for the issue tracker settings item-->
|
<!--Summary for the issue tracker settings item-->
|
||||||
<string name="report_issue_summary">Open the Syncthing-Android issue tracker</string>
|
<string name="folderrt_issue_summary">Open the Syncthing-Android issue tracker</string>
|
||||||
<!--URL of the issue tracker-->
|
<!--URL of the issue tracker-->
|
||||||
<!--Title of the preference showing upstream version name-->
|
<!--Title of the preference showing upstream version name-->
|
||||||
<string name="syncthing_version_title">Syncthing Version</string>
|
<string name="syncthing_version_title">Syncthing Version</string>
|
||||||
|
@ -134,7 +134,7 @@ Please install a scanner or enter the node ID manually.</string>
|
||||||
<!--ListView empty text-->
|
<!--ListView empty text-->
|
||||||
<string name="directory_empty">Directory is Empty</string>
|
<string name="directory_empty">Directory is Empty</string>
|
||||||
<!--Menu item to create folder-->
|
<!--Menu item to create folder-->
|
||||||
<string name="create_folder">Create new Folder</string>
|
<string name="create_fs_folder">Create new Folder</string>
|
||||||
<!--Menu item to select the current folder-->
|
<!--Menu item to select the current folder-->
|
||||||
<string name="select_folder">Select Folder</string>
|
<string name="select_folder">Select Folder</string>
|
||||||
<!--SyncthingService-->
|
<!--SyncthingService-->
|
||||||
|
@ -153,8 +153,8 @@ Please install a scanner or enter the node ID manually.</string>
|
||||||
<string name="restart_notification_text">Click here to restart syncthing now</string>
|
<string name="restart_notification_text">Click here to restart syncthing now</string>
|
||||||
<!--Text for the dismiss button of the restart Activity-->
|
<!--Text for the dismiss button of the restart Activity-->
|
||||||
<string name="restart_later">Restart Later</string>
|
<string name="restart_later">Restart Later</string>
|
||||||
<!--Shown when a node ID is copied to the clipboard-->
|
<!--Shown when a device ID is copied to the clipboard-->
|
||||||
<string name="node_id_copied_to_clipboard">Node ID copied to clipboard</string>
|
<string name="device_id_copied_to_clipboard">Device ID copied to clipboard</string>
|
||||||
<!--Strings representing units for file sizes, from smallest to largest-->
|
<!--Strings representing units for file sizes, from smallest to largest-->
|
||||||
<string-array name="file_size_units">
|
<string-array name="file_size_units">
|
||||||
<item>B</item>
|
<item>B</item>
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
<!--MainActivity-->
|
<!--MainActivity-->
|
||||||
<!--Title of the "add repo" menu action-->
|
<!--Title of the "add folder" menu action-->
|
||||||
<!--Title of the "share node id" menu action-->
|
<!--Title of the "share device id" menu action-->
|
||||||
<!--Shown in the chooser dialog when sharing a Node ID-->
|
<!--Shown in the chooser dialog when sharing a Device ID-->
|
||||||
<!--Text for RepositoriesFragment and NodesFragment loading view-->
|
<!--Text for FolderFragment and DevicesFragment loading view-->
|
||||||
<!--RepositoriesFragment-->
|
<!--FolderFragment-->
|
||||||
<!--Format string for repository progress. First parameter is status string, second is sync percentage-->
|
<!--Format string for folder progress. First parameter is status string, second is sync percentage-->
|
||||||
<!--Shown if no repos exist-->
|
<!--Shown if no folders exist-->
|
||||||
<!--Format string for repository file count-->
|
<!--Format string for folder file count-->
|
||||||
<!--NodesFragment-->
|
<!--DevicesFragment-->
|
||||||
<!--Shown if no nodes exist-->
|
<!--Shown if no devices exist-->
|
||||||
<!--Indicates that a repo is fully synced to the local node-->
|
<!--Indicates that a folder is fully synced to the local device-->
|
||||||
<!--Indicates that the node is currently syncing. Parameter is sync percentage-->
|
<!--Indicates that the device is currently syncing. Parameter is sync percentage-->
|
||||||
<!--Indicates that there is no connection to the node-->
|
<!--Indicates that there is no connection to the device-->
|
||||||
<!--Title for current download rate-->
|
<!--Title for current download rate-->
|
||||||
<!--Title for current upload rate-->
|
<!--Title for current upload rate-->
|
||||||
<!--LocalNodeInfoFragment-->
|
<!--LocalDeviceInfoFragment-->
|
||||||
<!--ActionBar title shown when the drawer is open-->
|
<!--ActionBar title shown when the drawer is open-->
|
||||||
<!--Same as download_title with a colon and space appended-->
|
<!--Same as download_title with a colon and space appended-->
|
||||||
<!--Same as upload_title with a colon and space appended-->
|
<!--Same as upload_title with a colon and space appended-->
|
||||||
<!--Title for current CPU usage-->
|
<!--Title for current CPU usage-->
|
||||||
<!--Title for current RAM usage-->
|
<!--Title for current RAM usage-->
|
||||||
<!--Title for announce server status-->
|
<!--Title for announce server status-->
|
||||||
<!--RepoSettingsFragment-->
|
<!--FolderSettingsFragment-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
|
@ -32,27 +32,27 @@
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Title for RepoSettingsFragment in create mode-->
|
<!--Title for FolderSettingsFragment in create mode-->
|
||||||
<!--Title for RepoSettingsFragment in edit mode-->
|
<!--Title for FolderSettingsFragment in edit mode-->
|
||||||
<!--Menu item to confirm repo creation-->
|
<!--Menu item to confirm folder creation-->
|
||||||
<!--Dialog shown when attempting to delete a repository-->
|
<!--Dialog shown when attempting to delete a folder-->
|
||||||
<!--Toast shown when trying to create a repository with an empty ID-->
|
<!--Toast shown when trying to create a folder with an empty ID-->
|
||||||
<!--Toast shown when trying to create a repository with an empty path-->
|
<!--Toast shown when trying to create a folder with an empty path-->
|
||||||
<!--Toast shown when selecting 'nodes' if no nodes have been added-->
|
<!--Toast shown when selecting 'devices' if no nodes have been added-->
|
||||||
<!--NodeSettingsFragment-->
|
<!--DeviceSettingsFragment-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--ActionBar item-->
|
<!--ActionBar item-->
|
||||||
<!--Title for NodeSettingsFragment in create mode-->
|
<!--Title for DeviceSettingsFragment in create mode-->
|
||||||
<!--Menu item to confirm adding a node-->
|
<!--Menu item to confirm adding a device-->
|
||||||
<!--Title for NodeSettingsFragment in edit mode-->
|
<!--Title for DeviceSettingsFragment in edit mode-->
|
||||||
<!--Dialog shown when attempting to delete a node-->
|
<!--Dialog shown when attempting to delete a device-->
|
||||||
<!--Toast shown when trying to create a node with an empty ID-->
|
<!--Toast shown when trying to create a device with an empty ID-->
|
||||||
<!--Toast shown when trying to create a node with an empty name-->
|
<!--Toast shown when trying to create a device with an empty name-->
|
||||||
<!--Content description for node ID qr code icon-->
|
<!--Content description for device ID qr code icon-->
|
||||||
<!--Text for toast shown if the "scan QR code" intent fails with an ActivityNotFoundException-->
|
<!--Text for toast shown if the "scan QR code" intent fails with an ActivityNotFoundException-->
|
||||||
<!--WebGuiActivity-->
|
<!--WebGuiActivity-->
|
||||||
<!--Title of the web gui activity-->
|
<!--Title of the web gui activity-->
|
||||||
|
@ -86,7 +86,7 @@
|
||||||
<!--Title of the notification shown when a restart is needed-->
|
<!--Title of the notification shown when a restart is needed-->
|
||||||
<!--Text of the notification shown when a restart is needed-->
|
<!--Text of the notification shown when a restart is needed-->
|
||||||
<!--Text for the dismiss button of the restart Activity-->
|
<!--Text for the dismiss button of the restart Activity-->
|
||||||
<!--Shown when a node ID is copied to the clipboard-->
|
<!--Shown when a device ID is copied to the clipboard-->
|
||||||
<!--Strings representing units for file sizes, from smallest to largest-->
|
<!--Strings representing units for file sizes, from smallest to largest-->
|
||||||
<!--Strings representing units for transfer rates, from smallest to largest-->
|
<!--Strings representing units for transfer rates, from smallest to largest-->
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
<!--MainActivity-->
|
<!--MainActivity-->
|
||||||
<!--Title of the "add repo" menu action-->
|
<!--Title of the "add folder" menu action-->
|
||||||
<!--Title of the "share node id" menu action-->
|
<!--Title of the "share device id" menu action-->
|
||||||
<!--Shown in the chooser dialog when sharing a Node ID-->
|
<!--Shown in the chooser dialog when sharing a Device ID-->
|
||||||
<!--Text for RepositoriesFragment and NodesFragment loading view-->
|
<!--Text for FolderFragment and DevicesFragment loading view-->
|
||||||
<!--RepositoriesFragment-->
|
<!--FolderFragment-->
|
||||||
<!--Format string for repository progress. First parameter is status string, second is sync percentage-->
|
<!--Format string for folder progress. First parameter is status string, second is sync percentage-->
|
||||||
<!--Shown if no repos exist-->
|
<!--Shown if no folders exist-->
|
||||||
<!--Format string for repository file count-->
|
<!--Format string for folder file count-->
|
||||||
<!--NodesFragment-->
|
<!--DevicesFragment-->
|
||||||
<!--Shown if no nodes exist-->
|
<!--Shown if no devices exist-->
|
||||||
<!--Indicates that a repo is fully synced to the local node-->
|
<!--Indicates that a folder is fully synced to the local device-->
|
||||||
<!--Indicates that the node is currently syncing. Parameter is sync percentage-->
|
<!--Indicates that the device is currently syncing. Parameter is sync percentage-->
|
||||||
<!--Indicates that there is no connection to the node-->
|
<!--Indicates that there is no connection to the device-->
|
||||||
<!--Title for current download rate-->
|
<!--Title for current download rate-->
|
||||||
<!--Title for current upload rate-->
|
<!--Title for current upload rate-->
|
||||||
<!--LocalNodeInfoFragment-->
|
<!--LocalDeviceInfoFragment-->
|
||||||
<!--ActionBar title shown when the drawer is open-->
|
<!--ActionBar title shown when the drawer is open-->
|
||||||
<!--Same as download_title with a colon and space appended-->
|
<!--Same as download_title with a colon and space appended-->
|
||||||
<!--Same as upload_title with a colon and space appended-->
|
<!--Same as upload_title with a colon and space appended-->
|
||||||
<!--Title for current CPU usage-->
|
<!--Title for current CPU usage-->
|
||||||
<!--Title for current RAM usage-->
|
<!--Title for current RAM usage-->
|
||||||
<!--Title for announce server status-->
|
<!--Title for announce server status-->
|
||||||
<!--RepoSettingsFragment-->
|
<!--FolderSettingsFragment-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
|
@ -32,27 +32,27 @@
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Title for RepoSettingsFragment in create mode-->
|
<!--Title for FolderSettingsFragment in create mode-->
|
||||||
<!--Title for RepoSettingsFragment in edit mode-->
|
<!--Title for FolderSettingsFragment in edit mode-->
|
||||||
<!--Menu item to confirm repo creation-->
|
<!--Menu item to confirm folder creation-->
|
||||||
<!--Dialog shown when attempting to delete a repository-->
|
<!--Dialog shown when attempting to delete a folder-->
|
||||||
<!--Toast shown when trying to create a repository with an empty ID-->
|
<!--Toast shown when trying to create a folder with an empty ID-->
|
||||||
<!--Toast shown when trying to create a repository with an empty path-->
|
<!--Toast shown when trying to create a folder with an empty path-->
|
||||||
<!--Toast shown when selecting 'nodes' if no nodes have been added-->
|
<!--Toast shown when selecting 'devices' if no nodes have been added-->
|
||||||
<!--NodeSettingsFragment-->
|
<!--DeviceSettingsFragment-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--ActionBar item-->
|
<!--ActionBar item-->
|
||||||
<!--Title for NodeSettingsFragment in create mode-->
|
<!--Title for DeviceSettingsFragment in create mode-->
|
||||||
<!--Menu item to confirm adding a node-->
|
<!--Menu item to confirm adding a device-->
|
||||||
<!--Title for NodeSettingsFragment in edit mode-->
|
<!--Title for DeviceSettingsFragment in edit mode-->
|
||||||
<!--Dialog shown when attempting to delete a node-->
|
<!--Dialog shown when attempting to delete a device-->
|
||||||
<!--Toast shown when trying to create a node with an empty ID-->
|
<!--Toast shown when trying to create a device with an empty ID-->
|
||||||
<!--Toast shown when trying to create a node with an empty name-->
|
<!--Toast shown when trying to create a device with an empty name-->
|
||||||
<!--Content description for node ID qr code icon-->
|
<!--Content description for device ID qr code icon-->
|
||||||
<!--Text for toast shown if the "scan QR code" intent fails with an ActivityNotFoundException-->
|
<!--Text for toast shown if the "scan QR code" intent fails with an ActivityNotFoundException-->
|
||||||
<!--WebGuiActivity-->
|
<!--WebGuiActivity-->
|
||||||
<!--Title of the web gui activity-->
|
<!--Title of the web gui activity-->
|
||||||
|
@ -86,7 +86,7 @@
|
||||||
<!--Title of the notification shown when a restart is needed-->
|
<!--Title of the notification shown when a restart is needed-->
|
||||||
<!--Text of the notification shown when a restart is needed-->
|
<!--Text of the notification shown when a restart is needed-->
|
||||||
<!--Text for the dismiss button of the restart Activity-->
|
<!--Text for the dismiss button of the restart Activity-->
|
||||||
<!--Shown when a node ID is copied to the clipboard-->
|
<!--Shown when a device ID is copied to the clipboard-->
|
||||||
<!--Strings representing units for file sizes, from smallest to largest-->
|
<!--Strings representing units for file sizes, from smallest to largest-->
|
||||||
<!--Strings representing units for transfer rates, from smallest to largest-->
|
<!--Strings representing units for transfer rates, from smallest to largest-->
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
<!--MainActivity-->
|
<!--MainActivity-->
|
||||||
<!--Title of the "add repo" menu action-->
|
<!--Title of the "add folder" menu action-->
|
||||||
<!--Title of the "share node id" menu action-->
|
<!--Title of the "share device id" menu action-->
|
||||||
<!--Shown in the chooser dialog when sharing a Node ID-->
|
<!--Shown in the chooser dialog when sharing a Device ID-->
|
||||||
<!--Text for RepositoriesFragment and NodesFragment loading view-->
|
<!--Text for FolderFragment and DevicesFragment loading view-->
|
||||||
<!--RepositoriesFragment-->
|
<!--FolderFragment-->
|
||||||
<!--Format string for repository progress. First parameter is status string, second is sync percentage-->
|
<!--Format string for folder progress. First parameter is status string, second is sync percentage-->
|
||||||
<!--Shown if no repos exist-->
|
<!--Shown if no folders exist-->
|
||||||
<!--Format string for repository file count-->
|
<!--Format string for folder file count-->
|
||||||
<!--NodesFragment-->
|
<!--DevicesFragment-->
|
||||||
<!--Shown if no nodes exist-->
|
<!--Shown if no devices exist-->
|
||||||
<!--Indicates that a repo is fully synced to the local node-->
|
<!--Indicates that a folder is fully synced to the local device-->
|
||||||
<!--Indicates that the node is currently syncing. Parameter is sync percentage-->
|
<!--Indicates that the device is currently syncing. Parameter is sync percentage-->
|
||||||
<!--Indicates that there is no connection to the node-->
|
<!--Indicates that there is no connection to the device-->
|
||||||
<!--Title for current download rate-->
|
<!--Title for current download rate-->
|
||||||
<!--Title for current upload rate-->
|
<!--Title for current upload rate-->
|
||||||
<!--LocalNodeInfoFragment-->
|
<!--LocalDeviceInfoFragment-->
|
||||||
<!--ActionBar title shown when the drawer is open-->
|
<!--ActionBar title shown when the drawer is open-->
|
||||||
<!--Same as download_title with a colon and space appended-->
|
<!--Same as download_title with a colon and space appended-->
|
||||||
<!--Same as upload_title with a colon and space appended-->
|
<!--Same as upload_title with a colon and space appended-->
|
||||||
<!--Title for current CPU usage-->
|
<!--Title for current CPU usage-->
|
||||||
<!--Title for current RAM usage-->
|
<!--Title for current RAM usage-->
|
||||||
<!--Title for announce server status-->
|
<!--Title for announce server status-->
|
||||||
<!--RepoSettingsFragment-->
|
<!--FolderSettingsFragment-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
|
@ -32,27 +32,27 @@
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Title for RepoSettingsFragment in create mode-->
|
<!--Title for FolderSettingsFragment in create mode-->
|
||||||
<!--Title for RepoSettingsFragment in edit mode-->
|
<!--Title for FolderSettingsFragment in edit mode-->
|
||||||
<!--Menu item to confirm repo creation-->
|
<!--Menu item to confirm folder creation-->
|
||||||
<!--Dialog shown when attempting to delete a repository-->
|
<!--Dialog shown when attempting to delete a folder-->
|
||||||
<!--Toast shown when trying to create a repository with an empty ID-->
|
<!--Toast shown when trying to create a folder with an empty ID-->
|
||||||
<!--Toast shown when trying to create a repository with an empty path-->
|
<!--Toast shown when trying to create a folder with an empty path-->
|
||||||
<!--Toast shown when selecting 'nodes' if no nodes have been added-->
|
<!--Toast shown when selecting 'devices' if no nodes have been added-->
|
||||||
<!--NodeSettingsFragment-->
|
<!--DeviceSettingsFragment-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<!--ActionBar item-->
|
<!--ActionBar item-->
|
||||||
<!--Title for NodeSettingsFragment in create mode-->
|
<!--Title for DeviceSettingsFragment in create mode-->
|
||||||
<!--Menu item to confirm adding a node-->
|
<!--Menu item to confirm adding a device-->
|
||||||
<!--Title for NodeSettingsFragment in edit mode-->
|
<!--Title for DeviceSettingsFragment in edit mode-->
|
||||||
<!--Dialog shown when attempting to delete a node-->
|
<!--Dialog shown when attempting to delete a device-->
|
||||||
<!--Toast shown when trying to create a node with an empty ID-->
|
<!--Toast shown when trying to create a device with an empty ID-->
|
||||||
<!--Toast shown when trying to create a node with an empty name-->
|
<!--Toast shown when trying to create a device with an empty name-->
|
||||||
<!--Content description for node ID qr code icon-->
|
<!--Content description for device ID qr code icon-->
|
||||||
<!--Text for toast shown if the "scan QR code" intent fails with an ActivityNotFoundException-->
|
<!--Text for toast shown if the "scan QR code" intent fails with an ActivityNotFoundException-->
|
||||||
<!--WebGuiActivity-->
|
<!--WebGuiActivity-->
|
||||||
<!--Title of the web gui activity-->
|
<!--Title of the web gui activity-->
|
||||||
|
@ -86,7 +86,7 @@
|
||||||
<!--Title of the notification shown when a restart is needed-->
|
<!--Title of the notification shown when a restart is needed-->
|
||||||
<!--Text of the notification shown when a restart is needed-->
|
<!--Text of the notification shown when a restart is needed-->
|
||||||
<!--Text for the dismiss button of the restart Activity-->
|
<!--Text for the dismiss button of the restart Activity-->
|
||||||
<!--Shown when a node ID is copied to the clipboard-->
|
<!--Shown when a device ID is copied to the clipboard-->
|
||||||
<!--Strings representing units for file sizes, from smallest to largest-->
|
<!--Strings representing units for file sizes, from smallest to largest-->
|
||||||
<!--Strings representing units for transfer rates, from smallest to largest-->
|
<!--Strings representing units for transfer rates, from smallest to largest-->
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -3,37 +3,37 @@
|
||||||
<string name="app_name">Syncthing</string>
|
<string name="app_name">Syncthing</string>
|
||||||
<string name="app_description">一個開放的、值得信賴的、分散式的專有服務取代品。</string>
|
<string name="app_description">一個開放的、值得信賴的、分散式的專有服務取代品。</string>
|
||||||
<!--MainActivity-->
|
<!--MainActivity-->
|
||||||
<!--Title of the "add repo" menu action-->
|
<!--Title of the "add folder" menu action-->
|
||||||
<string name="add_repo">增加儲存庫</string>
|
<string name="add_folder">增加儲存庫</string>
|
||||||
<!--Title of the "share node id" menu action-->
|
<!--Title of the "share device id" menu action-->
|
||||||
<string name="share_node_id">分享節點識別碼</string>
|
<string name="share_device_id">分享節點識別碼</string>
|
||||||
<!--Shown in the chooser dialog when sharing a Node ID-->
|
<!--Shown in the chooser dialog when sharing a Device ID-->
|
||||||
<string name="send_node_id_to">傳送節點識別碼給</string>
|
<string name="send_device_id_to">傳送節點識別碼給</string>
|
||||||
<!--Text for RepositoriesFragment and NodesFragment loading view-->
|
<!--Text for FolderFragment and DevicesFragment loading view-->
|
||||||
<string name="api_loading">正在等待 API</string>
|
<string name="api_loading">正在等待 API</string>
|
||||||
<!--RepositoriesFragment-->
|
<!--FolderFragment-->
|
||||||
<string name="repositories_fragment_title">儲存庫</string>
|
<string name="Folder_fragment_title">儲存庫</string>
|
||||||
<!--Format string for repository progress. First parameter is status string, second is sync percentage-->
|
<!--Format string for folder progress. First parameter is status string, second is sync percentage-->
|
||||||
<string name="repo_progress_format">%1$s (%2$d%%)</string>
|
<string name="folder_progress_format">%1$s (%2$d%%)</string>
|
||||||
<!--Shown if no repos exist-->
|
<!--Shown if no folders exist-->
|
||||||
<string name="repositories_list_empty">找不到儲存庫</string>
|
<string name="Folder_list_empty">找不到儲存庫</string>
|
||||||
<!--Format string for repository file count-->
|
<!--Format string for folder file count-->
|
||||||
<string name="files">%1$d / %2$d 個檔案</string>
|
<string name="files">%1$d / %2$d 個檔案</string>
|
||||||
<!--NodesFragment-->
|
<!--DevicesFragment-->
|
||||||
<string name="nodes_fragment_title">節點</string>
|
<string name="devices_fragment_title">節點</string>
|
||||||
<!--Shown if no nodes exist-->
|
<!--Shown if no devices exist-->
|
||||||
<string name="nodes_list_empty">找不到節點</string>
|
<string name="devices_list_empty">找不到節點</string>
|
||||||
<!--Indicates that a repo is fully synced to the local node-->
|
<!--Indicates that a folder is fully synced to the local device-->
|
||||||
<string name="node_up_to_date">最新</string>
|
<string name="device_up_to_date">最新</string>
|
||||||
<!--Indicates that the node is currently syncing. Parameter is sync percentage-->
|
<!--Indicates that the device is currently syncing. Parameter is sync percentage-->
|
||||||
<string name="node_syncing">正在同步 (%1$d%%)</string>
|
<string name="device_syncing">正在同步 (%1$d%%)</string>
|
||||||
<!--Indicates that there is no connection to the node-->
|
<!--Indicates that there is no connection to the device-->
|
||||||
<string name="node_disconnected">斷線</string>
|
<string name="device_disconnected">斷線</string>
|
||||||
<!--Title for current download rate-->
|
<!--Title for current download rate-->
|
||||||
<string name="download_title">下載</string>
|
<string name="download_title">下載</string>
|
||||||
<!--Title for current upload rate-->
|
<!--Title for current upload rate-->
|
||||||
<string name="upload_title">上載</string>
|
<string name="upload_title">上載</string>
|
||||||
<!--LocalNodeInfoFragment-->
|
<!--LocalDeviceInfoFragment-->
|
||||||
<!--ActionBar title shown when the drawer is open-->
|
<!--ActionBar title shown when the drawer is open-->
|
||||||
<string name="system_info">系統資訊</string>
|
<string name="system_info">系統資訊</string>
|
||||||
<!--Same as download_title with a colon and space appended-->
|
<!--Same as download_title with a colon and space appended-->
|
||||||
|
@ -46,40 +46,40 @@
|
||||||
<string name="ram_usage">記憶體使用率</string>
|
<string name="ram_usage">記憶體使用率</string>
|
||||||
<!--Title for announce server status-->
|
<!--Title for announce server status-->
|
||||||
<string name="announce_server">發布伺服器</string>
|
<string name="announce_server">發布伺服器</string>
|
||||||
<!--RepoSettingsFragment-->
|
<!--FolderSettingsFragment-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="repo_id">儲存庫識別碼</string>
|
<string name="folder_id">儲存庫識別碼</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="directory">資料夾</string>
|
<string name="directory">資料夾</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="rescan_interval">重新掃描間隔</string>
|
<string name="rescan_interval">重新掃描間隔</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="repo_master">主儲存庫</string>
|
<string name="folder_master">主儲存庫</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="nodes">節點</string>
|
<string name="devices">節點</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="file_versioning">檔案版本控制</string>
|
<string name="file_versioning">檔案版本控制</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="keep_versions">保留版本數</string>
|
<string name="keep_versions">保留版本數</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="delete_repo">刪除儲存庫</string>
|
<string name="delete_folder">刪除儲存庫</string>
|
||||||
<!--Title for RepoSettingsFragment in create mode-->
|
<!--Title for FolderSettingsFragment in create mode-->
|
||||||
<string name="create_repo">建立儲存庫</string>
|
<string name="create_folder">建立儲存庫</string>
|
||||||
<!--Title for RepoSettingsFragment in edit mode-->
|
<!--Title for FolderSettingsFragment in edit mode-->
|
||||||
<string name="edit_repo">編輯儲存庫</string>
|
<string name="edit_folder">編輯儲存庫</string>
|
||||||
<!--Menu item to confirm repo creation-->
|
<!--Menu item to confirm folder creation-->
|
||||||
<string name="create">建立</string>
|
<string name="create">建立</string>
|
||||||
<!--Dialog shown when attempting to delete a repository-->
|
<!--Dialog shown when attempting to delete a folder-->
|
||||||
<string name="delete_repo_confirm">您確定要刪除此儲存庫?</string>
|
<string name="delete_folder_confirm">您確定要刪除此儲存庫?</string>
|
||||||
<!--Toast shown when trying to create a repository with an empty ID-->
|
<!--Toast shown when trying to create a folder with an empty ID-->
|
||||||
<string name="repo_id_required">儲存庫識別碼不得為空</string>
|
<string name="folder_id_required">儲存庫識別碼不得為空</string>
|
||||||
<!--Toast shown when trying to create a repository with an empty path-->
|
<!--Toast shown when trying to create a folder with an empty path-->
|
||||||
<string name="repo_path_required">儲存庫路徑不得為空</string>
|
<string name="folder_path_required">儲存庫路徑不得為空</string>
|
||||||
<!--Toast shown when selecting 'nodes' if no nodes have been added-->
|
<!--Toast shown when selecting 'devices' if no nodes have been added-->
|
||||||
<string name="no_nodes">請先連接至一個節點。</string>
|
<string name="no_devices">請先連接至一個節點。</string>
|
||||||
<!--NodeSettingsFragment-->
|
<!--DeviceSettingsFragment-->
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="node_id">節點識別碼</string>
|
<string name="device_id">節點識別碼</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="name">名稱</string>
|
<string name="name">名稱</string>
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
|
@ -89,20 +89,20 @@
|
||||||
<!--Setting title-->
|
<!--Setting title-->
|
||||||
<string name="compression">壓縮</string>
|
<string name="compression">壓縮</string>
|
||||||
<!--ActionBar item-->
|
<!--ActionBar item-->
|
||||||
<string name="delete_node">刪除節點</string>
|
<string name="delete_device">刪除節點</string>
|
||||||
<!--Title for NodeSettingsFragment in create mode-->
|
<!--Title for DeviceSettingsFragment in create mode-->
|
||||||
<string name="add_node">增加節點</string>
|
<string name="add_device">增加節點</string>
|
||||||
<!--Menu item to confirm adding a node-->
|
<!--Menu item to confirm adding a device-->
|
||||||
<string name="add">增加</string>
|
<string name="add">增加</string>
|
||||||
<!--Title for NodeSettingsFragment in edit mode-->
|
<!--Title for DeviceSettingsFragment in edit mode-->
|
||||||
<string name="edit_node">編輯節點</string>
|
<string name="edit_device">編輯節點</string>
|
||||||
<!--Dialog shown when attempting to delete a node-->
|
<!--Dialog shown when attempting to delete a device-->
|
||||||
<string name="delete_node_confirm">您確定要刪除此節點?</string>
|
<string name="delete_device_confirm">您確定要刪除此節點?</string>
|
||||||
<!--Toast shown when trying to create a node with an empty ID-->
|
<!--Toast shown when trying to create a device with an empty ID-->
|
||||||
<string name="node_id_required">節點識別碼不得為空</string>
|
<string name="device_id_required">節點識別碼不得為空</string>
|
||||||
<!--Toast shown when trying to create a node with an empty name-->
|
<!--Toast shown when trying to create a device with an empty name-->
|
||||||
<string name="node_name_required">節點名稱不得為空</string>
|
<string name="device_name_required">節點名稱不得為空</string>
|
||||||
<!--Content description for node ID qr code icon-->
|
<!--Content description for device ID qr code icon-->
|
||||||
<string name="scan_qr_code_description">掃描 QR Code</string>
|
<string name="scan_qr_code_description">掃描 QR Code</string>
|
||||||
<!--Text for toast shown if the "scan QR code" intent fails with an ActivityNotFoundException-->
|
<!--Text for toast shown if the "scan QR code" intent fails with an ActivityNotFoundException-->
|
||||||
<string name="no_qr_scanner_installed">您未安裝 QR 掃描器或是您的掃描器未被支援。\
|
<string name="no_qr_scanner_installed">您未安裝 QR 掃描器或是您的掃描器未被支援。\
|
||||||
|
@ -132,9 +132,9 @@
|
||||||
<!--Title for the preference to set STTRACE parameters-->
|
<!--Title for the preference to set STTRACE parameters-->
|
||||||
<string name="sttrace_title">除錯選項</string>
|
<string name="sttrace_title">除錯選項</string>
|
||||||
<!--Settings item that opens issue tracker-->
|
<!--Settings item that opens issue tracker-->
|
||||||
<string name="report_issue_title">回報問題</string>
|
<string name="folderrt_issue_title">回報問題</string>
|
||||||
<!--Summary for the issue tracker settings item-->
|
<!--Summary for the issue tracker settings item-->
|
||||||
<string name="report_issue_summary">開啟 Syncthing-Android 問題追蹤器</string>
|
<string name="folderrt_issue_summary">開啟 Syncthing-Android 問題追蹤器</string>
|
||||||
<!--URL of the issue tracker-->
|
<!--URL of the issue tracker-->
|
||||||
<!--Title of the preference showing upstream version name-->
|
<!--Title of the preference showing upstream version name-->
|
||||||
<string name="syncthing_version_title">Syncthing 版本</string>
|
<string name="syncthing_version_title">Syncthing 版本</string>
|
||||||
|
@ -168,8 +168,8 @@
|
||||||
<string name="restart_notification_text">按此以重新啟動 syncthing</string>
|
<string name="restart_notification_text">按此以重新啟動 syncthing</string>
|
||||||
<!--Text for the dismiss button of the restart Activity-->
|
<!--Text for the dismiss button of the restart Activity-->
|
||||||
<string name="restart_later">稍後重新啟動</string>
|
<string name="restart_later">稍後重新啟動</string>
|
||||||
<!--Shown when a node ID is copied to the clipboard-->
|
<!--Shown when a device ID is copied to the clipboard-->
|
||||||
<string name="node_id_copied_to_clipboard">節點識別碼已複製至剪貼版</string>
|
<string name="device_id_copied_to_clipboard">節點識別碼已複製至剪貼版</string>
|
||||||
<!--Strings representing units for file sizes, from smallest to largest-->
|
<!--Strings representing units for file sizes, from smallest to largest-->
|
||||||
<string-array name="file_size_units">
|
<string-array name="file_size_units">
|
||||||
<item>B</item>
|
<item>B</item>
|
||||||
|
|
|
@ -9,48 +9,48 @@
|
||||||
<!-- MainActivity -->
|
<!-- MainActivity -->
|
||||||
|
|
||||||
|
|
||||||
<!-- Title of the "add repo" menu action -->
|
<!-- Title of the "add folder" menu action -->
|
||||||
<string name="add_repo">Add Repository</string>
|
<string name="add_folder">Add Folder</string>
|
||||||
|
|
||||||
<!-- Title of the "share node id" menu action -->
|
<!-- Title of the "share device id" menu action -->
|
||||||
<string name="share_node_id">Share Node ID</string>
|
<string name="share_device_id">Share Device ID</string>
|
||||||
|
|
||||||
<!-- Shown in the chooser dialog when sharing a Node ID -->
|
<!-- Shown in the chooser dialog when sharing a Device ID -->
|
||||||
<string name="send_node_id_to">Send Node ID to</string>
|
<string name="send_device_id_to">Send Device ID to</string>
|
||||||
|
|
||||||
<!-- Text for RepositoriesFragment and NodesFragment loading view -->
|
<!-- Text for FoldersFragment and DevicesFragment loading view -->
|
||||||
<string name="api_loading">Waiting for API</string>
|
<string name="api_loading">Waiting for API</string>
|
||||||
|
|
||||||
<!-- RepositoriesFragment -->
|
<!-- FoldersFragment -->
|
||||||
|
|
||||||
|
|
||||||
<string name="repositories_fragment_title">Repositories</string>
|
<string name="folders_fragment_title">Folders</string>
|
||||||
|
|
||||||
<!-- Format string for repository progress. First parameter is status string, second is sync percentage -->
|
<!-- Format string for folder progress. First parameter is status string, second is sync percentage -->
|
||||||
<string name="repo_progress_format">%1$s (%2$d%%)</string>
|
<string name="folder_progress_format">%1$s (%2$d%%)</string>
|
||||||
|
|
||||||
<!-- Shown if no repos exist -->
|
<!-- Shown if no folders exist -->
|
||||||
<string name="repositories_list_empty">No repositories found</string>
|
<string name="folder_list_empty">No folders found</string>
|
||||||
|
|
||||||
<!-- Format string for repository file count -->
|
<!-- Format string for folder file count -->
|
||||||
<string name="files">%1$d / %2$d Files</string>
|
<string name="files">%1$d / %2$d Files</string>
|
||||||
|
|
||||||
<!-- NodesFragment -->
|
<!-- DevicesFragment -->
|
||||||
|
|
||||||
|
|
||||||
<string name="nodes_fragment_title">Nodes</string>
|
<string name="devices_fragment_title">Devices</string>
|
||||||
|
|
||||||
<!-- Shown if no nodes exist -->
|
<!-- Shown if no devices exist -->
|
||||||
<string name="nodes_list_empty">No nodes found</string>
|
<string name="devices_list_empty">No devices found</string>
|
||||||
|
|
||||||
<!-- Indicates that a repo is fully synced to the local node -->
|
<!-- Indicates that a folder is fully synced to the local device -->
|
||||||
<string name="node_up_to_date">Up to Date</string>
|
<string name="device_up_to_date">Up to Date</string>
|
||||||
|
|
||||||
<!-- Indicates that the node is currently syncing. Parameter is sync percentage -->
|
<!-- Indicates that the device is currently syncing. Parameter is sync percentage -->
|
||||||
<string name="node_syncing">Syncing (%1$d%%)</string>
|
<string name="device_syncing">Syncing (%1$d%%)</string>
|
||||||
|
|
||||||
<!-- Indicates that there is no connection to the node -->
|
<!-- Indicates that there is no connection to the device -->
|
||||||
<string name="node_disconnected">Disconnected</string>
|
<string name="device_disconnected">Disconnected</string>
|
||||||
|
|
||||||
<!-- Title for current download rate -->
|
<!-- Title for current download rate -->
|
||||||
<string name="download_title">Download</string>
|
<string name="download_title">Download</string>
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
<!-- Title for current upload rate -->
|
<!-- Title for current upload rate -->
|
||||||
<string name="upload_title">Upload</string>
|
<string name="upload_title">Upload</string>
|
||||||
|
|
||||||
<!-- LocalNodeInfoFragment -->
|
<!-- LocalDeviceInfoFragment -->
|
||||||
|
|
||||||
|
|
||||||
<!-- ActionBar title shown when the drawer is open -->
|
<!-- ActionBar title shown when the drawer is open -->
|
||||||
|
@ -79,11 +79,11 @@
|
||||||
<!-- Title for announce server status -->
|
<!-- Title for announce server status -->
|
||||||
<string name="announce_server">Announce Server</string>
|
<string name="announce_server">Announce Server</string>
|
||||||
|
|
||||||
<!-- RepoSettingsFragment -->
|
<!-- FolderSettingsFragment -->
|
||||||
|
|
||||||
|
|
||||||
<!-- Setting title -->
|
<!-- Setting title -->
|
||||||
<string name="repo_id">Repository ID</string>
|
<string name="folder_id">Folder ID</string>
|
||||||
|
|
||||||
<!-- Setting title -->
|
<!-- Setting title -->
|
||||||
<string name="directory">Directory</string>
|
<string name="directory">Directory</string>
|
||||||
|
@ -92,10 +92,10 @@
|
||||||
<string name="rescan_interval">Rescan Interval</string>
|
<string name="rescan_interval">Rescan Interval</string>
|
||||||
|
|
||||||
<!-- Setting title -->
|
<!-- Setting title -->
|
||||||
<string name="repo_master">Repository Master</string>
|
<string name="folder_master">Folder Master</string>
|
||||||
|
|
||||||
<!-- Setting title -->
|
<!-- Setting title -->
|
||||||
<string name="nodes">Nodes</string>
|
<string name="devices">Devices</string>
|
||||||
|
|
||||||
<!-- Setting title -->
|
<!-- Setting title -->
|
||||||
<string name="file_versioning">File Versioning</string>
|
<string name="file_versioning">File Versioning</string>
|
||||||
|
@ -104,34 +104,34 @@
|
||||||
<string name="keep_versions">Keep Versions</string>
|
<string name="keep_versions">Keep Versions</string>
|
||||||
|
|
||||||
<!-- Setting title -->
|
<!-- Setting title -->
|
||||||
<string name="delete_repo">Delete Repository</string>
|
<string name="delete_folder">Delete Folder</string>
|
||||||
|
|
||||||
<!-- Title for RepoSettingsFragment in create mode -->
|
<!-- Title for FolderSettingsFragment in create mode -->
|
||||||
<string name="create_repo">Create Repository</string>
|
<string name="create_folder">Create Folder</string>
|
||||||
|
|
||||||
<!-- Title for RepoSettingsFragment in edit mode -->
|
<!-- Title for FolderSettingsFragment in edit mode -->
|
||||||
<string name="edit_repo">Edit Repository</string>
|
<string name="edit_folder">Edit Folder</string>
|
||||||
|
|
||||||
<!-- Menu item to confirm repo creation -->
|
<!-- Menu item to confirm folder creation -->
|
||||||
<string name="create">Create</string>
|
<string name="create">Create</string>
|
||||||
|
|
||||||
<!-- Dialog shown when attempting to delete a repository -->
|
<!-- Dialog shown when attempting to delete a folder -->
|
||||||
<string name="delete_repo_confirm">Do you really want to delete this repository?</string>
|
<string name="delete_folder_confirm">Do you really want to delete this folder?</string>
|
||||||
|
|
||||||
<!-- Toast shown when trying to create a repository with an empty ID -->
|
<!-- Toast shown when trying to create a folder with an empty ID -->
|
||||||
<string name="repo_id_required">The repository ID must not be empty</string>
|
<string name="folder_id_required">The folder ID must not be empty</string>
|
||||||
|
|
||||||
<!-- Toast shown when trying to create a repository with an empty path -->
|
<!-- Toast shown when trying to create a folder with an empty path -->
|
||||||
<string name="repo_path_required">The repository path must not be empty</string>
|
<string name="folder_path_required">The folder path must not be empty</string>
|
||||||
|
|
||||||
<!-- Toast shown when selecting 'nodes' if no nodes have been added -->
|
<!-- Toast shown when selecting 'devices' if no devices have been added -->
|
||||||
<string name="no_nodes">Please connect a node first.</string>
|
<string name="no_devices">Please connect a device first.</string>
|
||||||
|
|
||||||
<!-- NodeSettingsFragment -->
|
<!-- DeviceSettingsFragment -->
|
||||||
|
|
||||||
|
|
||||||
<!-- Setting title -->
|
<!-- Setting title -->
|
||||||
<string name="node_id">Node ID</string>
|
<string name="device_id">Device ID</string>
|
||||||
|
|
||||||
<!-- Setting title -->
|
<!-- Setting title -->
|
||||||
<string name="name">Name</string>
|
<string name="name">Name</string>
|
||||||
|
@ -146,32 +146,32 @@
|
||||||
<string name="compression">Compression</string>
|
<string name="compression">Compression</string>
|
||||||
|
|
||||||
<!-- ActionBar item -->
|
<!-- ActionBar item -->
|
||||||
<string name="delete_node">Delete Node</string>
|
<string name="delete_device">Delete Device</string>
|
||||||
|
|
||||||
<!-- Title for NodeSettingsFragment in create mode -->
|
<!-- Title for DeviceSettingsFragment in create mode -->
|
||||||
<string name="add_node">Add Node</string>
|
<string name="add_device">Add Device</string>
|
||||||
|
|
||||||
<!-- Menu item to confirm adding a node -->
|
<!-- Menu item to confirm adding a device -->
|
||||||
<string name="add">Add</string>
|
<string name="add">Add</string>
|
||||||
|
|
||||||
<!-- Title for NodeSettingsFragment in edit mode -->
|
<!-- Title for DeviceSettingsFragment in edit mode -->
|
||||||
<string name="edit_node">Edit Node</string>
|
<string name="edit_device">Edit Device</string>
|
||||||
|
|
||||||
<!-- Dialog shown when attempting to delete a node -->
|
<!-- Dialog shown when attempting to delete a device -->
|
||||||
<string name="delete_node_confirm">Do you really want to delete this node?</string>
|
<string name="delete_device_confirm">Do you really want to delete this device?</string>
|
||||||
|
|
||||||
<!-- Toast shown when trying to create a node with an empty ID -->
|
<!-- Toast shown when trying to create a device with an empty ID -->
|
||||||
<string name="node_id_required">The node ID must not be empty</string>
|
<string name="device_id_required">The device ID must not be empty</string>
|
||||||
|
|
||||||
<!-- Toast shown when trying to create a node with an empty name -->
|
<!-- Toast shown when trying to create a device with an empty name -->
|
||||||
<string name="node_name_required">The node name must not be empty</string>
|
<string name="device_name_required">The device name must not be empty</string>
|
||||||
|
|
||||||
<!-- Content description for node ID qr code icon -->
|
<!-- Content description for device ID qr code icon -->
|
||||||
<string name="scan_qr_code_description">Scan QR Code</string>
|
<string name="scan_qr_code_description">Scan QR Code</string>
|
||||||
|
|
||||||
<!-- Text for toast shown if the "scan QR code" intent fails with an ActivityNotFoundException -->
|
<!-- Text for toast shown if the "scan QR code" intent fails with an ActivityNotFoundException -->
|
||||||
<string name="no_qr_scanner_installed">You have no QR scanner installed or your scanner is not supported. \
|
<string name="no_qr_scanner_installed">You have no QR scanner installed or your scanner is not supported. \
|
||||||
Please install a scanner or enter the node ID manually.</string>
|
Please install a scanner or enter the device ID manually.</string>
|
||||||
|
|
||||||
<!-- WebGuiActivity -->
|
<!-- WebGuiActivity -->
|
||||||
|
|
||||||
|
@ -236,8 +236,8 @@ Please report any problems you encounter via Github.</string>
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">Directory is Empty</string>
|
<string name="directory_empty">Directory is Empty</string>
|
||||||
|
|
||||||
<!-- Menu item to create folder -->
|
<!-- Menu item to create folder on the file system -->
|
||||||
<string name="create_folder">Create new Folder</string>
|
<string name="create_fs_folder">Create new Folder</string>
|
||||||
|
|
||||||
<!-- Menu item to select the current folder -->
|
<!-- Menu item to select the current folder -->
|
||||||
<string name="select_folder">Select Folder</string>
|
<string name="select_folder">Select Folder</string>
|
||||||
|
@ -276,8 +276,8 @@ If this error persists, try restarting your device.</string>
|
||||||
<!-- Text for the dismiss button of the restart Activity -->
|
<!-- Text for the dismiss button of the restart Activity -->
|
||||||
<string name="restart_later">Restart Later</string>
|
<string name="restart_later">Restart Later</string>
|
||||||
|
|
||||||
<!-- Shown when a node ID is copied to the clipboard -->
|
<!-- Shown when a device ID is copied to the clipboard -->
|
||||||
<string name="node_id_copied_to_clipboard">Node ID copied to clipboard</string>
|
<string name="device_id_copied_to_clipboard">Device ID copied to clipboard</string>
|
||||||
|
|
||||||
<!-- Strings representing units for file sizes, from smallest to largest -->
|
<!-- Strings representing units for file sizes, from smallest to largest -->
|
||||||
<string-array name="file_size_units">
|
<string-array name="file_size_units">
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
android:persistent="false">
|
android:persistent="false">
|
||||||
|
|
||||||
<EditTextPreference
|
<EditTextPreference
|
||||||
android:key="node_id"
|
android:key="device_id"
|
||||||
android:title="@string/node_id"
|
android:title="@string/device_id"
|
||||||
android:widgetLayout="@layout/scan_qr_code_widget" />
|
android:widgetLayout="@layout/scan_qr_code_widget" />
|
||||||
|
|
||||||
<EditTextPreference
|
<EditTextPreference
|
|
@ -3,8 +3,8 @@
|
||||||
android:persistent="false">
|
android:persistent="false">
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:key="node_id"
|
android:key="device_id"
|
||||||
android:title="@string/node_id" />
|
android:title="@string/device_id" />
|
||||||
|
|
||||||
<EditTextPreference
|
<EditTextPreference
|
||||||
android:key="name"
|
android:key="name"
|
|
@ -3,8 +3,8 @@
|
||||||
android:persistent="false">
|
android:persistent="false">
|
||||||
|
|
||||||
<EditTextPreference
|
<EditTextPreference
|
||||||
android:key="repo_id"
|
android:key="folder_id"
|
||||||
android:title="@string/repo_id" />
|
android:title="@string/folder_id" />
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:key="directory"
|
android:key="directory"
|
||||||
|
@ -16,12 +16,12 @@
|
||||||
android:inputType="numberDecimal" />
|
android:inputType="numberDecimal" />
|
||||||
|
|
||||||
<CheckBoxPreference
|
<CheckBoxPreference
|
||||||
android:key="repo_master"
|
android:key="folder_master"
|
||||||
android:title="@string/repo_master" />
|
android:title="@string/folder_master" />
|
||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
android:key="nodes"
|
android:key="devices"
|
||||||
android:title="@string/nodes" />
|
android:title="@string/devices" />
|
||||||
|
|
||||||
<CheckBoxPreference
|
<CheckBoxPreference
|
||||||
android:key="versioning"
|
android:key="versioning"
|
|
@ -3,8 +3,8 @@
|
||||||
android:persistent="false">
|
android:persistent="false">
|
||||||
|
|
||||||
<EditTextPreference
|
<EditTextPreference
|
||||||
android:key="repo_id"
|
android:key="folder_id"
|
||||||
android:title="@string/repo_id"
|
android:title="@string/folder_id"
|
||||||
android:enabled="false"
|
android:enabled="false"
|
||||||
style="?android:preferenceInformationStyle" />
|
style="?android:preferenceInformationStyle" />
|
||||||
|
|
||||||
|
@ -20,12 +20,12 @@
|
||||||
android:inputType="numberDecimal" />
|
android:inputType="numberDecimal" />
|
||||||
|
|
||||||
<CheckBoxPreference
|
<CheckBoxPreference
|
||||||
android:key="repo_master"
|
android:key="folder_master"
|
||||||
android:title="@string/repo_master" />
|
android:title="@string/folder_master" />
|
||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
android:key="nodes"
|
android:key="devices"
|
||||||
android:title="@string/nodes" />
|
android:title="@string/devices" />
|
||||||
|
|
||||||
<CheckBoxPreference
|
<CheckBoxPreference
|
||||||
android:key="versioning"
|
android:key="versioning"
|
Loading…
Reference in a new issue