Skip to content

Feature/admin forth/1281/let's add hard limit to transl#12

Open
ivictbor wants to merge 3 commits intomainfrom
feature/AdminForth/1281/let's-add-hard-limit-to-transl
Open

Feature/admin forth/1281/let's add hard limit to transl#12
ivictbor wants to merge 3 commits intomainfrom
feature/AdminForth/1281/let's-add-hard-limit-to-transl

Conversation

@ivictbor
Copy link
Contributor

No description provided.

index.ts Outdated
const stringsToTranslate = strings.map( s => s.en_string);
const generationTasks = []
while (stringsToTranslate.length !== 0) {
let stringBanch = [];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yaroslav8765 const?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const

continue;
}
}
if ( stringBanch.length === 0 ) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yaroslav8765 but if there is some one string which is larger itself then allowedTokensAmountForFields , there will be no warning for user right? So he will not understand why some string was not translated

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've improved notifications system

index.ts Outdated
let stringBanch = [];
let banchTokens = 0;
for (const string of stringsToTranslate) {
if( banchTokens + enStringsTokenLengthCache[string] <= allowedTokensAmountForFields ) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if string is e.g. 4 KiB then indexing by such string kills CPU, do we have uuid to address? and not using en_string?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants