Merge branch 'release/v1.0.0' of github.com:ONLYOFFICE/DocSpace into release/v1.0.0

This commit is contained in:
Elyor Djalilov 2023-04-14 15:10:06 +05:00
commit a980e57196
5 changed files with 61 additions and 16 deletions

View File

@ -69,6 +69,7 @@ public class LocalesTest
//public List<JsonEncodingError> WrongEncodingJsonErrors { get; set; }
private static readonly string _md5ExcludesPath = Path.GetFullPath(Utils.ConvertPathToOS("../../../md5-excludes.json"));
private static readonly string _spellCheckCommonExcludesPath = Path.GetFullPath(Utils.ConvertPathToOS("../../../spellcheck-excludes-common.json"));
//private static string _encodingExcludesPath = "../../../encoding-excludes.json";
@ -76,6 +77,10 @@ public class LocalesTest
? JsonConvert.DeserializeObject<List<string>>(File.ReadAllText(_md5ExcludesPath))
: new List<string>();
private static readonly List<string> _spellCheckCommonExcludes = File.Exists(_spellCheckCommonExcludesPath)
? JsonConvert.DeserializeObject<List<string>>(File.ReadAllText(_spellCheckCommonExcludesPath))
: new List<string>();
//private static List<string> encodingExcludes = File.Exists(_encodingExcludesPath)
// ? JsonConvert.DeserializeObject<List<string>>(File.ReadAllText(_encodingExcludesPath))
// : new List<string>();
@ -336,6 +341,8 @@ public class LocalesTest
TestContext.Progress.WriteLine($"Found _md5Excludes = {_md5Excludes.Count()} Path to file '{_md5ExcludesPath}'");
TestContext.Progress.WriteLine($"Found _spellCheckCommonExcludes = {_spellCheckCommonExcludes.Count()} Path to file '{_spellCheckCommonExcludesPath}'");
}
[Test]
@ -407,7 +414,19 @@ public class LocalesTest
if (result.HasProblems)
{
message += $"{++i}. lng='{group.Language}' file='{g.FilePath}'\r\nkey='{item.Key}' value='{item.Value}'\r\nIncorrect words:\r\n{string.Join("\r\n", result.SpellIssues.Select(issue => $"'{issue.Word}' Suggestion: '{issue.Suggestions.FirstOrDefault()}'"))}\r\n\r\n";
var incorrectWords = result.SpellIssues
.Where(t => !_spellCheckCommonExcludes
.Exists(e => e.Equals(t.Word, StringComparison.InvariantCultureIgnoreCase)))
.Select(issue => $"'{issue.Word}' " +
$"Suggestion: '{issue.Suggestions.FirstOrDefault()}'")
.ToList();
if (!incorrectWords.Any())
continue;
message += $"{++i}. lng='{group.Language}' file='{g.FilePath}'\r\nkey='{item.Key}' " +
$"value='{item.Value}'\r\nIncorrect words:\r\n" +
$"{string.Join("\r\n", incorrectWords)}\r\n\r\n";
errorsCount++;

View File

@ -0,0 +1,20 @@
[
"Amazon",
"AWS",
"DocSpace",
"ONLYOFFICE",
"ID",
"IP",
"IPv4",
"IPv",
"DNS",
"SVG",
"PNG",
"NameId",
"IdP",
"Sp",
"macOS",
"SAML",
"Stripe",
"SDK"
]

View File

@ -48,6 +48,7 @@ const CreateUserForm = (props) => {
isDesktop,
linkData,
capabilities,
currentColorScheme,
} = props;
const inputRef = React.useRef(null);
@ -445,7 +446,7 @@ const CreateUserForm = (props) => {
type="action"
fontSize="13px"
fontWeight="600"
color="#3B72A7"
color={currentColorScheme?.main?.accent}
className="more-label"
onClick={moreAuthOpen}
>
@ -672,6 +673,7 @@ export default inject(({ auth }) => {
defaultPage,
getSettings,
getPortalPasswordSettings,
currentColorScheme,
} = settingsStore;
return {
@ -687,6 +689,7 @@ export default inject(({ auth }) => {
thirdPartyLogin,
providers,
capabilities,
currentColorScheme,
};
})(
withRouter(

View File

@ -2,9 +2,17 @@ import React from "react";
import Tags from "@docspace/common/components/Tags";
import { RoomsTypeTranslations } from "@docspace/common/constants";
//import { RoomsTypeTranslations } from "@docspace/common/constants";
import Text from "@docspace/components/text";
const TagsCell = ({ t, item, tagCount, onSelectTag, onSelectOption }) => {
const TagsCell = ({
t,
item,
tagCount,
onSelectTag,
onSelectOption,
sideColor,
}) => {
const styleTagsCell = {
width: "100%",
overflow: "hidden",
@ -28,21 +36,16 @@ const TagsCell = ({ t, item, tagCount, onSelectTag, onSelectOption }) => {
if (item?.tags?.length > 0) {
tags.push(...item.tags);
} else {
tags.push({
isDefault: true,
label: t(RoomsTypeTranslations[item.roomType]),
onClick: () =>
onSelectOption({
option: "defaultTypeRoom",
value: item.roomType,
}),
});
}
return (
<div style={styleTagsCell}>
{tags.length === 0 ? (
<Text color={sideColor}>{"—"}</Text>
) : (
<Tags tags={tags} columnCount={tagCount} onSelectTag={onSelectTag} />
)}
{/* {item.providerType && (
<Tag
icon={item.thirdPartyIcon}

View File

@ -239,7 +239,7 @@ const Login: React.FC<ILoginProps> = ({
type="action"
fontSize="13px"
fontWeight="600"
color="#3B72A7"
color={currentColorScheme?.main?.accent}
className="more-label"
onClick={moreAuthOpen}
>