Skip to content

Commit

Permalink
[ Edit ]
Browse files Browse the repository at this point in the history
  • Loading branch information
anasfik committed Dec 1, 2023
1 parent fda5201 commit 0559eaf
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 18 deletions.
28 changes: 14 additions & 14 deletions lib/src/commands/start_command/start_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -190,24 +190,24 @@ class StartCommand extends Command<int> {
}
}

void _writeResultToFiles({
required Map<String, JsonContentMap> res,
required Directory outputDir,
}) {
final progress = logger.customProgress('Writing results to files..');
// void _writeResultToFiles({
// required Map<String, JsonContentMap> res,
// required Directory outputDir,
// }) {
// final progress = logger.customProgress('Writing results to files..');

res.forEach((key, value) {
final file = File('${outputDir.path}/$key.json');
// res.forEach((key, value) {
// final file = File('${outputDir.path}/$key.json');

if (!file.existsSync()) {
file.createSync(recursive: true);
}
// if (!file.existsSync()) {
// file.createSync(recursive: true);
// }

progress.update('Writing $key.json');
// progress.update('Writing $key.json');

file.writeAsStringSync(value.toPrettyJson());
});
}
// file.writeAsStringSync(value.toPrettyJson());
// });
// }

Future<void> _writeNewLocalizationFiles({
required List<LangOutput> outputList,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/etc/models/user_info.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:equatable/equatable.dart';
import 'package:langsync/src/etc/extensions.dart';
import 'package:langsync/src/etc/models/Localization_doc.dart';
import 'package:langsync/src/etc/models/localization_doc.dart';

class UserInfo extends Equatable {
const UserInfo({
Expand Down
4 changes: 3 additions & 1 deletion lib/src/etc/networking/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ class NetClient extends NetClientBoilerPlate {
required Iterable<String> langs,
required String apiKey,
required String operationId,
required int? languageLocalizationMaxDelay, required String? instruction, bool includeOutput = false,
required int? languageLocalizationMaxDelay,
required String? instruction,
bool includeOutput = false,
}) {
return sseStreamReq<List<LangSyncServerSSE>>(
'/process-translation',
Expand Down
1 change: 0 additions & 1 deletion lib/src/etc/utils.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'dart:io';
import 'dart:math';


final utils = Utils();

class Utils {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: langsync
description: A Very Good Project created by Very Good CLI.
description: an AI powered localization tool for any platform and language.
version: 0.9.5
homepage: https://langsync.app
repository: https://github.com/LangSync/cli
Expand Down

0 comments on commit 0559eaf

Please sign in to comment.