{"record":{"id":"99f81312261abcb7","repo":"pentaho/pentaho-kettle","slug":"i18n-log-unabletogetfiles","errorCode":null,"errorMessage":"i18n.Log.UnableToGetFiles","messagePattern":"i18n\\.Log\\.UnableToGetFiles","errorType":"exception","errorClass":"KettleFileException","httpStatus":null,"severity":"error","filePath":"ui/src/main/java/org/pentaho/di/ui/i18n/editor/Translator2.java","lineNumber":252,"sourceCode":"              locales[j] = locales[j + 1];\n              locales[j + 1] = l;\n            }\n          }\n        }\n\n        for ( int i = 0; i < locales.length; i++ ) {\n          double donePct = 100 * (double) keyCounts[i] / nrKeys;\n          int missingKeys = nrKeys - keyCounts[i];\n          String statusKeys =\n            \"# \"\n              + nrFormat.format( i + 1L ) + \" : \" + locales[i] + \" : \" + pctFormat.format( donePct ) + \"% \"\n              + BaseMessages.getString( PKG, \"i18n.Log.CompleteKeys\", keyCounts[i] )\n              + ( missingKeys != 0 ? BaseMessages.getString( PKG, \"i18n.Log.MissingKeys\", missingKeys ) : EMPTY_STRING );\n          System.out.println( statusKeys );\n        }\n      }\n    } catch ( Exception e ) {\n      throw new KettleFileException( BaseMessages.getString( PKG, \"i18n.Log.UnableToGetFiles\", rootDirectories\n        .toString() ), e );\n    }\n  }\n\n  public void loadConfiguration( String configFile, String sourceFolder ) throws Exception {\n    // What are the locale to handle?\n    //\n    localeList = new ArrayList<>();\n    rootDirectories = new ArrayList<>();\n    filesToAvoid = new ArrayList<>();\n    xmlFolders = new ArrayList<>();\n\n    FileObject file = KettleVFS.getInstance( DefaultBowl.getInstance() ).getFileObject( configFile );\n    if ( file.exists() ) {\n      try {\n        Document doc = XMLHandler.loadXMLFile( file );\n        Node configNode = XMLHandler.getSubNode( doc, \"translator-config\" );\n","sourceCodeStart":234,"sourceCodeEnd":270,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/ui/src/main/java/org/pentaho/di/ui/i18n/editor/Translator2.java#L234-L270","documentation":"Translator2 (the newer Translator UI) wraps any exception thrown while scanning rootDirectories for i18n files and locale key sets into a KettleFileException, with the directory list rendered from the localized message i18n.Log.UnableToGetFiles. It signals that the locale/file inventory for the configured source folders could not be built.","triggerScenarios":"readFiles() (called by open()/reload()) fails because a configured root directory does not exist or is unreadable, or processing a discovered locale file throws (parse/IO error).","commonSituations":"Translator2 config file points at source folders from a different machine or deleted checkout; the chosen source folder has no messages files; permissions issues after a workspace move.","solutions":["Check the directories listed in the error exist and are readable; fix the Translator2 configuration (loadConfiguration configFile / sourceFolder).","Re-run loadConfiguration with the correct root source folder of the PDI project.","Fix permissions on the source tree.","Inspect the chained cause 'e' for the underlying exception type and file."],"exampleFix":"// before\n// configFile points to /home/olduser/pdi-ui/src (deleted)\ntranslator2.readFiles(); // KettleFileException\n\n// after\n// update config to current checkout\ntranslator2.loadConfiguration( configFile, \"/home/dev/pentaho-kettle/ui/src\" );\ntranslator2.readFiles();","handlingStrategy":"validation","validationCode":"for ( String dir : rootDirectories ) {\n  if ( !new File( dir ).isDirectory() ) {\n    throw new IllegalStateException( \"Configured i18n root missing: \" + dir );\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  translator2.readFiles();\n} catch ( KettleFileException e ) {\n  log.error( \"Check rootDirectories from the Translator2 config: \" + e.getMessage(), e );\n}","preventionTips":["Keep the Translator2 config file's source folders machine-local and existing","Re-run loadConfiguration after moving or re-cloning the workspace","Verify read permissions before opening the tool"],"tags":["i18n","translator","directory-scan","config"],"backgroundTag":"directory-not-found","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}