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