Jelajahi Sumber

Fixed spelling mistakes that required API breaking changes

JaniruTEC 3 tahun lalu
induk
melakukan
000f27e166

+ 1 - 1
.github/CODE_OF_CONDUCT.md

@@ -22,7 +22,7 @@ include:
 
 Examples of unacceptable behavior by participants include:
 
-* The use of sexualized language or imagery and unwelcome sexual attention or
+* The use of sexual language or imagery and unwelcome sexual attention or
   advances
 * Trolling, insulting/derogatory comments, and personal or political attacks
 * Public or private harassment

+ 9 - 9
src/main/java/org/cryptomator/common/vaults/VaultStats.java

@@ -35,8 +35,8 @@ public class VaultStats {
 	private final LongProperty bytesPerSecondEncrypted = new SimpleLongProperty();
 	private final LongProperty bytesPerSecondDecrypted = new SimpleLongProperty();
 	private final DoubleProperty cacheHitRate = new SimpleDoubleProperty();
-	private final LongProperty toalBytesRead = new SimpleLongProperty();
-	private final LongProperty toalBytesWritten = new SimpleLongProperty();
+	private final LongProperty totalBytesRead = new SimpleLongProperty();
+	private final LongProperty totalBytesWritten = new SimpleLongProperty();
 	private final LongProperty totalBytesEncrypted = new SimpleLongProperty();
 	private final LongProperty totalBytesDecrypted = new SimpleLongProperty();
 	private final LongProperty filesRead = new SimpleLongProperty();
@@ -75,8 +75,8 @@ public class VaultStats {
 		cacheHitRate.set(stats.map(this::getCacheHitRate).orElse(0.0));
 		bytesPerSecondDecrypted.set(stats.map(CryptoFileSystemStats::pollBytesDecrypted).orElse(0L));
 		bytesPerSecondEncrypted.set(stats.map(CryptoFileSystemStats::pollBytesEncrypted).orElse(0L));
-		toalBytesRead.set(stats.map(CryptoFileSystemStats::pollTotalBytesRead).orElse(0L));
-		toalBytesWritten.set(stats.map(CryptoFileSystemStats::pollTotalBytesWritten).orElse(0L));
+		totalBytesRead.set(stats.map(CryptoFileSystemStats::pollTotalBytesRead).orElse(0L));
+		totalBytesWritten.set(stats.map(CryptoFileSystemStats::pollTotalBytesWritten).orElse(0L));
 		totalBytesEncrypted.set(stats.map(CryptoFileSystemStats::pollTotalBytesEncrypted).orElse(0L));
 		totalBytesDecrypted.set(stats.map(CryptoFileSystemStats::pollTotalBytesDecrypted).orElse(0L));
 		var oldAccessCount = filesRead.get() + filesWritten.get();
@@ -146,7 +146,7 @@ public class VaultStats {
 		return bytesPerSecondEncrypted;
 	}
 
-	public long getBytesPerSecondEnrypted() {
+	public long getBytesPerSecondEncrypted() {
 		return bytesPerSecondEncrypted.get();
 	}
 
@@ -164,13 +164,13 @@ public class VaultStats {
 		return cacheHitRate.get();
 	}
 
-	public LongProperty toalBytesReadProperty() {return toalBytesRead;}
+	public LongProperty totalBytesReadProperty() {return totalBytesRead;}
 
-	public long getTotalBytesRead() { return toalBytesRead.get();}
+	public long getTotalBytesRead() { return totalBytesRead.get();}
 
-	public LongProperty toalBytesWrittenProperty() {return toalBytesWritten;}
+	public LongProperty totalBytesWrittenProperty() {return totalBytesWritten;}
 
-	public long getTotalBytesWritten() { return toalBytesWritten.get();}
+	public long getTotalBytesWritten() { return totalBytesWritten.get();}
 
 	public LongProperty totalBytesEncryptedProperty() {return totalBytesEncrypted;}
 

+ 2 - 2
src/main/java/org/cryptomator/logging/LaunchAndSizeBasedTriggerinPolicy.java

@@ -11,12 +11,12 @@ import java.io.File;
  *
  * @param <E> Event type the policy possibly reacts to
  */
-public class LaunchAndSizeBasedTriggerinPolicy<E> extends TriggeringPolicyBase<E> {
+public class LaunchAndSizeBasedTriggeringPolicy<E> extends TriggeringPolicyBase<E> {
 
 	LaunchBasedTriggeringPolicy<E> launchBasedTriggeringPolicy;
 	SizeBasedTriggeringPolicy<E> sizeBasedTriggeringPolicy;
 
-	public LaunchAndSizeBasedTriggerinPolicy(FileSize threshold) {
+	public LaunchAndSizeBasedTriggeringPolicy(FileSize threshold) {
 		this.launchBasedTriggeringPolicy = new LaunchBasedTriggeringPolicy<>();
 		this.sizeBasedTriggeringPolicy = new SizeBasedTriggeringPolicy<>();
 		sizeBasedTriggeringPolicy.setMaxFileSize(threshold);

+ 1 - 1
src/main/java/org/cryptomator/logging/LoggerModule.java

@@ -85,7 +85,7 @@ public class LoggerModule {
 			appender.setContext(context);
 			appender.setFile(logDir.resolve(LOGFILE_NAME).toString());
 			appender.setEncoder(encoder);
-			LaunchAndSizeBasedTriggerinPolicy triggeringPolicy = new LaunchAndSizeBasedTriggerinPolicy(FileSize.valueOf(LOG_MAX_SIZE));
+			LaunchAndSizeBasedTriggeringPolicy triggeringPolicy = new LaunchAndSizeBasedTriggeringPolicy(FileSize.valueOf(LOG_MAX_SIZE));
 			triggeringPolicy.setContext(context);
 			triggeringPolicy.start();
 			appender.setTriggeringPolicy(triggeringPolicy);

+ 1 - 1
src/main/java/org/cryptomator/ui/common/WeakBindings.java

@@ -77,7 +77,7 @@ public final class WeakBindings {
 	 * @param observable The observable
 	 * @return a IntegerBinding weakly referenced from the given observable
 	 */
-	public static IntegerBinding bindInterger(ObservableValue<Number> observable) {
+	public static IntegerBinding bindInteger(ObservableValue<Number> observable) {
 		return new IntegerBinding() {
 			{
 				bind(observable);

+ 2 - 2
src/main/java/org/cryptomator/ui/controls/ThrougputLabel.java

@@ -8,7 +8,7 @@ import javafx.beans.property.SimpleStringProperty;
 import javafx.beans.property.StringProperty;
 import javafx.scene.control.Label;
 
-public class ThrougputLabel extends Label {
+public class ThroughputLabel extends Label {
 
 	private static final long KIBS_THRESHOLD = 1l << 7; // 0.128 kiB/s
 	private static final long MIBS_THRESHOLD = 1l << 19; // 0.512 MiB/s
@@ -18,7 +18,7 @@ public class ThrougputLabel extends Label {
 	private final StringProperty mibsFormat = new SimpleStringProperty("%.3f");
 	private final LongProperty bytesPerSecond = new SimpleLongProperty();
 
-	public ThrougputLabel() {
+	public ThroughputLabel() {
 		textProperty().bind(createStringBinding());
 	}
 

+ 5 - 5
src/main/java/org/cryptomator/ui/recoverykey/AutoCompleter.java

@@ -26,7 +26,7 @@ public class AutoCompleter {
 		if (Strings.isNullOrEmpty(prefix)) {
 			return Optional.empty();
 		}
-		int potentialMatchIdx = findIndexOfLexicographicallyPreceeding(0, dictionary.size(), prefix);
+		int potentialMatchIdx = findIndexOfLexicographicallyPreceding(0, dictionary.size(), prefix);
 		if (potentialMatchIdx < dictionary.size()) {
 			String potentialMatch = dictionary.get(potentialMatchIdx);
 			return potentialMatch.startsWith(prefix) ? Optional.of(potentialMatch) : Optional.empty();
@@ -48,21 +48,21 @@ public class AutoCompleter {
 	 * @param prefix
 	 * @return index between [0, dictLen], i.e. index can exceed the upper bounds of {@link #dictionary}.
 	 */
-	private int findIndexOfLexicographicallyPreceeding(int begin, int end, String prefix) {
+	private int findIndexOfLexicographicallyPreceding(int begin, int end, String prefix) {
 		if (begin >= end) {
 			return begin; // this is usually where a binary search ends "unsuccessful"
 		}
 
 		int mid = (begin + end) / 2;
 		String word = dictionary.get(mid);
-		if (prefix.compareTo(word) <= 0) { // prefix preceeds or matches word
+		if (prefix.compareTo(word) <= 0) { // prefix precedes or matches word
 			// proceed in left half
 			assert mid < end;
-			return findIndexOfLexicographicallyPreceeding(0, mid, prefix);
+			return findIndexOfLexicographicallyPreceding(0, mid, prefix);
 		} else {
 			// proceed in right half
 			assert mid >= begin;
-			return findIndexOfLexicographicallyPreceeding(mid + 1, end, prefix);
+			return findIndexOfLexicographicallyPreceding(mid + 1, end, prefix);
 		}
 	}
 

+ 2 - 2
src/main/java/org/cryptomator/ui/stats/VaultStatisticsController.java

@@ -65,8 +65,8 @@ public class VaultStatisticsController implements FxController {
 		this.cacheHitRate = WeakBindings.bindDouble(stats.cacheHitRateProperty());
 		this.cacheHitDegrees = cacheHitRate.multiply(-270);
 		this.cacheHitPercentage = cacheHitRate.multiply(100);
-		this.totalBytesRead = WeakBindings.bindLong(stats.toalBytesReadProperty());
-		this.totalBytesWritten = WeakBindings.bindLong(stats.toalBytesWrittenProperty());
+		this.totalBytesRead = WeakBindings.bindLong(stats.totalBytesReadProperty());
+		this.totalBytesWritten = WeakBindings.bindLong(stats.totalBytesWrittenProperty());
 		this.totalBytesDecrypted = WeakBindings.bindLong(stats.totalBytesDecryptedProperty());
 		this.totalBytesEncrypted = WeakBindings.bindLong(stats.totalBytesEncryptedProperty());
 		this.filesRead = WeakBindings.bindLong(stats.filesRead());

+ 3 - 3
src/main/resources/fxml/stats.fxml

@@ -2,7 +2,7 @@
 
 <?import org.cryptomator.ui.controls.DataLabel?>
 <?import org.cryptomator.ui.controls.FormattedLabel?>
-<?import org.cryptomator.ui.controls.ThrougputLabel?>
+<?import org.cryptomator.ui.controls.ThroughputLabel?>
 <?import javafx.geometry.Insets?>
 <?import javafx.scene.chart.AreaChart?>
 <?import javafx.scene.chart.NumberAxis?>
@@ -37,7 +37,7 @@
 
 	<!-- Read -->
 	<VBox prefWidth="300" prefHeight="300" spacing="6" alignment="CENTER">
-		<ThrougputLabel styleClass="label-large" idleFormat="%stats.read.throughput.idle" kibsFormat="%stats.read.throughput.kibs" mibsFormat="%stats.read.throughput.mibs" bytesPerSecond="${controller.bpsRead}"/>
+		<ThroughputLabel styleClass="label-large" idleFormat="%stats.read.throughput.idle" kibsFormat="%stats.read.throughput.kibs" mibsFormat="%stats.read.throughput.mibs" bytesPerSecond="${controller.bpsRead}"/>
 		<AreaChart fx:id="readChart" styleClass="io-stats" createSymbols="false" animated="false">
 			<xAxis>
 				<NumberAxis fx:id="readChartXAxis" styleClass="io-stats" autoRanging="false" forceZeroInRange="false" side="BOTTOM"/>
@@ -56,7 +56,7 @@
 
 	<!-- Write -->
 	<VBox prefWidth="300" prefHeight="300" spacing="6" alignment="CENTER">
-		<ThrougputLabel styleClass="label-large" idleFormat="%stats.write.throughput.idle" kibsFormat="%stats.write.throughput.kibs" mibsFormat="%stats.write.throughput.mibs" bytesPerSecond="${controller.bpsWritten}"/>
+		<ThroughputLabel styleClass="label-large" idleFormat="%stats.write.throughput.idle" kibsFormat="%stats.write.throughput.kibs" mibsFormat="%stats.write.throughput.mibs" bytesPerSecond="${controller.bpsWritten}"/>
 		<AreaChart fx:id="writeChart" styleClass="io-stats" createSymbols="false" animated="false">
 			<xAxis>
 				<NumberAxis fx:id="writeChartXAxis" styleClass="io-stats" autoRanging="false" forceZeroInRange="false" side="BOTTOM"/>

+ 3 - 3
src/main/resources/fxml/vault_detail_unlocked.fxml

@@ -1,5 +1,5 @@
 <?import org.cryptomator.ui.controls.FontAwesome5IconView?>
-<?import org.cryptomator.ui.controls.ThrougputLabel?>
+<?import org.cryptomator.ui.controls.ThroughputLabel?>
 <?import javafx.scene.control.Button?>
 <?import javafx.scene.control.Label?>
 <?import javafx.scene.control.Tooltip?>
@@ -41,11 +41,11 @@
 				<VBox spacing="6">
 					<HBox alignment="CENTER_RIGHT" spacing="6">
 						<Label styleClass="label-small,label-muted" text="%main.vaultDetail.bytesPerSecondRead"/>
-						<ThrougputLabel styleClass="label-small,label-muted" alignment="CENTER_RIGHT" minWidth="60" idleFormat="%main.vaultDetail.throughput.idle" kibsFormat="%main.vaultDetail.throughput.kbps" mibsFormat="%main.vaultDetail.throughput.mbps" bytesPerSecond="${controller.vault.stats.bytesPerSecondRead}"/>
+						<ThroughputLabel styleClass="label-small,label-muted" alignment="CENTER_RIGHT" minWidth="60" idleFormat="%main.vaultDetail.throughput.idle" kibsFormat="%main.vaultDetail.throughput.kbps" mibsFormat="%main.vaultDetail.throughput.mbps" bytesPerSecond="${controller.vault.stats.bytesPerSecondRead}"/>
 					</HBox>
 					<HBox alignment="CENTER_RIGHT" spacing="6">
 						<Label styleClass="label-small,label-muted" text="%main.vaultDetail.bytesPerSecondWritten"/>
-						<ThrougputLabel styleClass="label-small,label-muted" alignment="CENTER_RIGHT" minWidth="60" idleFormat="%main.vaultDetail.throughput.idle" kibsFormat="%main.vaultDetail.throughput.kbps" mibsFormat="%main.vaultDetail.throughput.mbps" bytesPerSecond="${controller.vault.stats.bytesPerSecondWritten}"/>
+						<ThroughputLabel styleClass="label-small,label-muted" alignment="CENTER_RIGHT" minWidth="60" idleFormat="%main.vaultDetail.throughput.idle" kibsFormat="%main.vaultDetail.throughput.kbps" mibsFormat="%main.vaultDetail.throughput.mbps" bytesPerSecond="${controller.vault.stats.bytesPerSecondWritten}"/>
 					</HBox>
 				</VBox>
 			</graphic>