Skip to content

Commit

Permalink
Merge pull request #2041 from bakdata/feature/internationalization-fo…
Browse files Browse the repository at this point in the history
…r-excel-sheet

Internationalization for sheet name
  • Loading branch information
Njimefo authored Aug 27, 2021
2 parents feb432a + 50803d0 commit 6d1a472
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.bakdata.conquery.internationalization;

import c10n.annotations.De;
import c10n.annotations.En;

public interface ExcelSheetNameC10n {
@En("Result")
@De("Ergebnis")
String result();
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package com.bakdata.conquery.io.result.excel;

import c10n.C10N;
import com.bakdata.conquery.internationalization.ExcelSheetNameC10n;
import com.bakdata.conquery.models.common.CDate;
import com.bakdata.conquery.models.config.ExcelConfig;
import com.bakdata.conquery.models.execution.ManagedExecution;
import com.bakdata.conquery.models.externalservice.ResultType;
import com.bakdata.conquery.models.i18n.I18n;
import com.bakdata.conquery.models.query.PrintSettings;
import com.bakdata.conquery.models.query.SingleTableResult;
import com.bakdata.conquery.models.query.resultinfo.ResultInfo;
Expand Down Expand Up @@ -68,8 +71,8 @@ public <E extends ManagedExecution<?> & SingleTableResult> void renderToStream(
List<ResultInfo> info = exec.getResultInfo();


// TODO internationalize
SXSSFSheet sheet = workbook.createSheet("Result");

SXSSFSheet sheet = workbook.createSheet(C10N.get(ExcelSheetNameC10n.class, I18n.LOCALE.get()).result());
try {
sheet.setDefaultColumnWidth(config.getDefaultColumnWidth());

Expand Down

0 comments on commit 6d1a472

Please sign in to comment.