mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-09 14:08:00 -06:00
Added translations, fixed chips theming
This commit is contained in:
@@ -2,8 +2,10 @@ import 'package:flutter/material.dart';
|
||||
import 'package:paperless_api/paperless_api.dart';
|
||||
import 'package:paperless_mobile/generated/l10n.dart';
|
||||
|
||||
String translateMatchingAlgorithm(
|
||||
BuildContext context, MatchingAlgorithm algorithm) {
|
||||
String translateMatchingAlgorithmDescription(
|
||||
BuildContext context,
|
||||
MatchingAlgorithm algorithm,
|
||||
) {
|
||||
switch (algorithm) {
|
||||
case MatchingAlgorithm.anyWord:
|
||||
return S.of(context).matchingAlgorithmAnyDescription;
|
||||
@@ -19,3 +21,23 @@ String translateMatchingAlgorithm(
|
||||
return S.of(context).matchingAlgorithmAutoDescription;
|
||||
}
|
||||
}
|
||||
|
||||
String translateMatchingAlgorithmName(
|
||||
BuildContext context,
|
||||
MatchingAlgorithm algorithm,
|
||||
) {
|
||||
switch (algorithm) {
|
||||
case MatchingAlgorithm.anyWord:
|
||||
return S.of(context).matchingAlgorithmAnyName;
|
||||
case MatchingAlgorithm.allWords:
|
||||
return S.of(context).matchingAlgorithmAllName;
|
||||
case MatchingAlgorithm.exactMatch:
|
||||
return S.of(context).matchingAlgorithmExactName;
|
||||
case MatchingAlgorithm.regex:
|
||||
return S.of(context).matchingAlgorithmRegexName;
|
||||
case MatchingAlgorithm.fuzzy:
|
||||
return S.of(context).matchingAlgorithmFuzzyName;
|
||||
case MatchingAlgorithm.auto:
|
||||
return S.of(context).matchingAlgorithmAutoName;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user